Changeset 61465 for trunk/tests/phpunit/tests/admin/includesTemplate.php
- Timestamp:
- 01/10/2026 06:36:40 AM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesTemplate.php
r60253 r61465 495 495 remove_meta_box( 'dashboard2', 'dashboard', 'normal' ); 496 496 } 497 498 /** 499 * Tests that get_post_states() handles a null value gracefully. 500 * 501 * This can happen when get_post() returns null (e.g., when a post 502 * doesn't exist) and that result is passed to get_post_states() 503 * without being checked first. 504 * 505 * @ticket 58932 506 * 507 * @covers ::get_post_states 508 */ 509 public function test_get_post_states_with_null_returns_empty_array() { 510 $result = get_post_states( null ); 511 $this->assertSame( array(), $result, 'get_post_states() should return an empty array when WP_Post is not supplied.' ); 512 } 497 513 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)