Changeset 53773
- Timestamp:
- 07/25/2022 01:31:24 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/general/template.php
r52010 r53773 39 39 */ 40 40 public function test_get_site_icon_url() { 41 $this->assertEmpty( get_site_icon_url() );41 $this->assertEmpty( get_site_icon_url(), 'Site icon URL should not be set initially.' ); 42 42 43 43 $this->set_site_icon(); 44 $this->assertSame( $this->site_icon_url, get_site_icon_url() );44 $this->assertSame( $this->site_icon_url, get_site_icon_url(), 'Site icon URL should be set.' ); 45 45 46 46 $this->remove_site_icon(); 47 $this->assertEmpty( get_site_icon_url() );47 $this->assertEmpty( get_site_icon_url(), 'Site icon URL should not be set after removal.' ); 48 48 } 49 49 … … 68 68 */ 69 69 public function test_has_site_icon() { 70 $this->assertFalse( has_site_icon() );70 $this->assertFalse( has_site_icon(), 'Site icon should not be set initially.' ); 71 71 72 72 $this->set_site_icon(); 73 $this->assertTrue( has_site_icon() );73 $this->assertTrue( has_site_icon(), 'Site icon should be set.' ); 74 74 75 75 $this->remove_site_icon(); 76 $this->assertFalse( has_site_icon() );76 $this->assertFalse( has_site_icon(), 'Site icon should not be set after removal.' ); 77 77 } 78 78 … … 262 262 */ 263 263 public function test_has_custom_logo() { 264 $this->assertFalse( has_custom_logo() );264 $this->assertFalse( has_custom_logo(), 'Custom logo should not be set initially.' ); 265 265 266 266 $this->set_custom_logo(); 267 $this->assertTrue( has_custom_logo() );267 $this->assertTrue( has_custom_logo(), 'Custom logo should be set.' ); 268 268 269 269 $this->remove_custom_logo(); 270 $this->assertFalse( has_custom_logo() );270 $this->assertFalse( has_custom_logo(), 'Custom logo should not be set after removal.' ); 271 271 } 272 272 … … 305 305 */ 306 306 public function test_get_custom_logo() { 307 $this->assertEmpty( get_custom_logo() );307 $this->assertEmpty( get_custom_logo(), 'Custom logo should not be set initially.' ); 308 308 309 309 $this->set_custom_logo(); 310 310 $custom_logo = get_custom_logo(); 311 $this->assertNotEmpty( $custom_logo );312 $this->assertIsString( $custom_logo );311 $this->assertNotEmpty( $custom_logo, 'Custom logo markup should not be empty.' ); 312 $this->assertIsString( $custom_logo, 'Custom logo markup should be a string.' ); 313 313 314 314 $this->remove_custom_logo(); 315 $this->assertEmpty( get_custom_logo() );315 $this->assertEmpty( get_custom_logo(), 'Custom logo should not be set after removal.' ); 316 316 } 317 317 … … 403 403 404 404 /** 405 * Sets a site iconin options for testing.405 * Sets a custom logo in options for testing. 406 406 * 407 407 * @since 4.5.0 … … 416 416 417 417 /** 418 * Removes the site iconfrom options.418 * Removes the custom logo from options. 419 419 * 420 420 * @since 4.5.0
Note: See TracChangeset
for help on using the changeset viewer.