Files
wp-multisite-waas/tests/WP_Ultimo_Test.php
2025-02-07 19:02:33 -07:00

37 lines
1.3 KiB
PHP

<?php
namespace WP_Ultimo;
class WP_Ultimo_Test extends \WP_UnitTestCase {
/**
* Test if all helper functions are loaded correctly.
*
* This test case creates an instance of the WP_Ultimo class and calls the load_public_apis method.
* It then asserts that the helper functions wu_to_float, wu_replace_dashes, and wu_get_initials are
* correctly loaded. Additional assertions can be added for other helper functions.
*
* @return void
*/
public function testLoadAllHelperFunctionsCorrectly() {
// Assert that all helper functions are loaded correctly.
// This is all done in the bootstrap.
$this->assertTrue(function_exists('wu_to_float'));
$this->assertTrue(function_exists('wu_replace_dashes'));
$this->assertTrue(function_exists('wu_get_initials'));
}
public function testLoaded() {
$wpUltimo = \WP_Ultimo();
$this->assertTrue($wpUltimo->version === \WP_Ultimo::VERSION);
$this->assertTrue($wpUltimo->is_loaded());
}
public function testPublicProperties() {
$wpUltimo = \WP_Ultimo();
$this->assertTrue($wpUltimo->settings instanceof Settings);
$this->assertTrue($wpUltimo->helper instanceof Helper);
$this->assertTrue($wpUltimo->notices instanceof Admin_Notices);
$this->assertTrue($wpUltimo->scripts instanceof Scripts);
$this->assertTrue($wpUltimo->currents instanceof Current);
}
}