Changeset 64111
- Timestamp:
- 10/05/2026 07:03:12 PM (2 weeks ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/cache.php
r57987 r64111 404 404 $this->assertInstanceOf( 'WP_Object_Cache', $wp_object_cache ); 405 405 } else { 406 // Keep assertEquals() because the objects are intentionally compared by value. 406 407 $this->assertEquals( $wp_object_cache, $new_blank_cache_object ); 407 408 } -
trunk/tests/phpunit/tests/functions.php
r63880 r64111 1113 1113 $this->assertNotEmpty( $date_return, 'The date return could not be an empty string' ); 1114 1114 $this->assertSame( $expected, $date_return, 'The date does not match' ); 1115 // Keep assertEquals() because the objects are intentionally compared by value. 1115 1116 $this->assertEquals( new DateTime( $expected ), new DateTime( $date_return ), 'The date is not the same after the call method' ); 1116 1117 } … … 1182 1183 $this->assertSame( $ini_limit_before, $ini_limit_after ); 1183 1184 $this->assertFalse( $raised_limit ); 1184 $this->assert Equals(WP_MAX_MEMORY_LIMIT, $ini_limit_after );1185 $this->assertSame( (string) WP_MAX_MEMORY_LIMIT, $ini_limit_after ); 1185 1186 } 1186 1187 -
trunk/tests/phpunit/tests/json-schema.php
r62591 r64111 132 132 $this->assertArrayNotHasKey( 'required', $prepared['properties']['title'] ); 133 133 $this->assertArrayNotHasKey( 'validate_callback', $prepared['properties']['title'] ); 134 // Keep assertEquals() because the objects are intentionally compared by value. 134 135 $this->assertEquals( new stdClass(), $prepared['properties']['settings']['default'] ); 135 136 $this->assertSame( array( 'settings' ), $prepared['dependencies']['title'] ); -
trunk/tests/phpunit/tests/post.php
r63880 r64111 188 188 _unregister_post_type( $post_type ); 189 189 $count = wp_count_posts( $post_type, 'readable' ); 190 // Keep assertEquals() because the objects are intentionally compared by value. 190 191 $this->assertEquals( new stdClass(), $count ); 191 192 } -
trunk/tests/phpunit/tests/query.php
r62476 r64111 77 77 $this->assertEmpty( get_query_var( 'tax_query' ) ); 78 78 $this->assertCount( 1, get_query_var( 'tag_slug__in' ) ); 79 // Keep assertEquals() because the objects are intentionally compared by value. 79 80 $this->assertEquals( get_queried_object(), $tag ); 80 81 … … 88 89 $this->assertNotEmpty( $query->get( 'tag' ) ); 89 90 $this->assertCount( 1, $query->get( 'tag_slug__in' ) ); 91 // Keep assertEquals() because the objects are intentionally compared by value. 90 92 $this->assertEquals( $query->get_queried_object(), $tag ); 91 93 } -
trunk/tests/phpunit/tests/theme.php
r63627 r64111 80 80 $single_theme = wp_get_theme( $this->theme_slug ); 81 81 $this->assertSame( $single_theme->get( 'Name' ), $themes[ $this->theme_slug ]->get( 'Name' ) ); 82 // Keep assertEquals() because the objects are intentionally compared by value. 82 83 $this->assertEquals( $themes[ $this->theme_slug ], $single_theme ); 83 84 } … … 127 128 // This primes internal WP_Theme caches for the next assertion (headers_sanitized, textdomain_loaded). 128 129 $this->assertSame( $theme->get( 'Name' ), $_theme->get( 'Name' ) ); 130 // Keep assertEquals() because the objects are intentionally compared by value. 129 131 $this->assertEquals( $theme, $_theme ); 130 132 } -
trunk/tests/phpunit/tests/user.php
r63924 r64111 219 219 $user = new WP_User( self::$author_id ); 220 220 221 // Keep assertEquals() because the public ID is an integer while data->ID may be a numeric string. 221 222 foreach ( $user->data as $key => $data ) { 222 223 $this->assertEquals( $data, $user->$key ); … … 450 451 451 452 $user = new WP_User( self::$author_id ); 453 // Keep assertEquals() because integer preference flags and the user ID may be retrieved as numeric strings. 452 454 foreach ( $user_data as $key => $value ) { 453 455 $this->assertEquals( $value, $user->get( $key ), $key );
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)