Changeset 63880
- Timestamp:
- 09/22/2026 11:04:55 PM (8 days ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 13 edited
-
customize/manager.php (modified) (1 diff)
-
customize/setting.php (modified) (2 diffs)
-
functions.php (modified) (1 diff)
-
icons/wpRestIconsController.php (modified) (1 diff)
-
image/functions.php (modified) (1 diff)
-
post.php (modified) (2 diffs)
-
rest-api/rest-users-controller.php (modified) (3 diffs)
-
rest-api/wpRestAbilitiesV1CategoriesController.php (modified) (1 diff)
-
rest-api/wpRestAbilitiesV1ListController.php (modified) (1 diff)
-
script-modules/wpScriptModules.php (modified) (1 diff)
-
template.php (modified) (1 diff)
-
term/wpInsertTerm.php (modified) (1 diff)
-
theme/themeDir.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/manager.php
r63333 r63880 3042 3042 $url = 'http://badreferer.example.com/'; 3043 3043 $_SERVER['HTTP_REFERER'] = wp_slash( $url ); 3044 $this->assertNot Equals( $url, $this->manager->get_return_url() );3044 $this->assertNotSame( $url, $this->manager->get_return_url() ); 3045 3045 $this->assertSame( $preview_url, $this->manager->get_return_url() ); 3046 3046 -
trunk/tests/phpunit/tests/customize/setting.php
r63333 r63880 189 189 $this->assertSame( $overridden_value, call_user_func( $type_options['getter'], $name ), $message ); 190 190 $this->assertSame( $overridden_value, $setting->value(), $message ); 191 $this->assertNot Equals( $initial_value, $setting->value(), $message );191 $this->assertNotSame( $initial_value, $setting->value(), $message ); 192 192 193 193 // Non-multidimensional: Ensure that setting a post value *after* preview() is called results in the post value being seen (deferred preview). … … 196 196 $this->manager->set_post_value( $setting->id, $post_value ); 197 197 $this->assertSame( 1, did_action( "customize_post_value_set_{$setting->id}" ) ); 198 $this->assertNot Equals( $overridden_value, $setting->value() );198 $this->assertNotSame( $overridden_value, $setting->value() ); 199 199 $this->assertSame( $post_value, call_user_func( $type_options['getter'], $name ) ); 200 200 $this->assertSame( $post_value, $setting->value() ); -
trunk/tests/phpunit/tests/functions.php
r63333 r63880 2268 2268 public function test_wp_get_default_extension_for_mime_type() { 2269 2269 $this->assertSame( 'jpg', wp_get_default_extension_for_mime_type( 'image/jpeg' ), 'jpg not returned as default extension for "image/jpeg"' ); 2270 $this->assertNot Equals( 'jpeg', wp_get_default_extension_for_mime_type( 'image/jpeg' ), 'jpeg should not be returned as default extension for "image/jpeg"' );2270 $this->assertNotSame( 'jpeg', wp_get_default_extension_for_mime_type( 'image/jpeg' ), 'jpeg should not be returned as default extension for "image/jpeg"' ); 2271 2271 $this->assertSame( 'png', wp_get_default_extension_for_mime_type( 'image/png' ), 'png not returned as default extension for "image/png"' ); 2272 2272 $this->assertFalse( wp_get_default_extension_for_mime_type( 'wibble/wobble' ), 'false not returned for unrecognized mime type' ); -
trunk/tests/phpunit/tests/icons/wpRestIconsController.php
r63625 r63880 403 403 404 404 $this->assertSame( 200, $response->get_status() ); 405 $this->assert Equals( array( 'core/at-symbol' ), array_column( $data, 'name' ) );405 $this->assertSame( array( 'core/at-symbol' ), array_column( $data, 'name' ) ); 406 406 } 407 407 -
trunk/tests/phpunit/tests/image/functions.php
r60703 r63880 1015 1015 1016 1016 // PDF preview didn't overwrite PDF. 1017 $this->assertNot Equals( $pdf_path, $preview_path );1017 $this->assertNotSame( $pdf_path, $preview_path ); 1018 1018 // PDF preview didn't overwrite JPG with same name. 1019 $this->assertNot Equals( $jpg1_path, $preview_path );1019 $this->assertNotSame( $jpg1_path, $preview_path ); 1020 1020 $this->assertSame( 'asdf', file_get_contents( $jpg1_path ) ); 1021 1021 // PDF preview didn't overwrite PDF preview with same name. 1022 $this->assertNot Equals( $jpg2_path, $preview_path );1022 $this->assertNotSame( $jpg2_path, $preview_path ); 1023 1023 $this->assertSame( 'fdsa', file_get_contents( $jpg2_path ) ); 1024 1024 -
trunk/tests/phpunit/tests/post.php
r63616 r63880 274 274 $post = get_post( $post_ids[ $key ] ); 275 275 $this->assertSame( 'draft', $post->post_status ); 276 $this->assertNot Equals( 'publish', $post->post_status );276 $this->assertNotSame( 'publish', $post->post_status ); 277 277 278 278 $after_draft_counts = wp_count_posts(); … … 295 295 $post = get_post( $post_ids[ $key ] ); 296 296 $this->assertSame( 'trash', $post->post_status ); 297 $this->assertNot Equals( 'publish', $post->post_status );297 $this->assertNotSame( 'publish', $post->post_status ); 298 298 299 299 $after_trash_counts = wp_count_posts(); -
trunk/tests/phpunit/tests/rest-api/rest-users-controller.php
r63160 r63880 1996 1996 1997 1997 $this->assertSame( 'editor', $new_data['roles'][0] ); 1998 $this->assertNot Equals( 'administrator', $new_data['roles'][0] );1998 $this->assertNotSame( 'administrator', $new_data['roles'][0] ); 1999 1999 2000 2000 $user = get_userdata( $user_id ); … … 2091 2091 $new_data = $response->get_data(); 2092 2092 $this->assertSame( 'editor', $new_data['roles'][0] ); 2093 $this->assertNot Equals( 'administrator', $new_data['roles'][0] );2093 $this->assertNotSame( 'administrator', $new_data['roles'][0] ); 2094 2094 2095 2095 $user_id = self::factory()->user->create( array( 'role' => 'administrator' ) ); … … 2105 2105 $new_data = $response->get_data(); 2106 2106 $this->assertSame( 'editor', $new_data['roles'][0] ); 2107 $this->assertNot Equals( 'administrator', $new_data['roles'][0] );2107 $this->assertNotSame( 'administrator', $new_data['roles'][0] ); 2108 2108 } 2109 2109 -
trunk/tests/phpunit/tests/rest-api/wpRestAbilitiesV1CategoriesController.php
r62831 r63880 276 276 277 277 $total_categories = count( wp_get_ability_categories() ); 278 $this->assert Equals( $total_categories, (int) $headers['X-WP-Total'] );278 $this->assertSame( $total_categories, (int) $headers['X-WP-Total'] ); 279 279 $this->assertEquals( ceil( $total_categories / 10 ), (int) $headers['X-WP-TotalPages'] ); 280 280 } -
trunk/tests/phpunit/tests/rest-api/wpRestAbilitiesV1ListController.php
r62831 r63880 505 505 506 506 $total_abilities = count( wp_get_abilities() ) - 1; // Exclude the one that doesn't show in REST. 507 $this->assert Equals( $total_abilities, (int) $headers['X-WP-Total'] );507 $this->assertSame( $total_abilities, (int) $headers['X-WP-Total'] ); 508 508 $this->assertEquals( ceil( $total_abilities / 10 ), (int) $headers['X-WP-TotalPages'] ); 509 509 } -
trunk/tests/phpunit/tests/script-modules/wpScriptModules.php
r63628 r63880 2586 2586 $script_modules = get_echo( array( wp_script_modules(), 'print_enqueued_script_modules' ) ); 2587 2587 2588 $this->assert Equals(2588 $this->assertSame( 2589 2589 array( 2590 2590 'static1' => '/static1.js', -
trunk/tests/phpunit/tests/template.php
r63628 r63880 753 753 $processed_output = ob_get_clean(); // Obtain the output via the wrapper output buffer. 754 754 $this->assertIsString( $processed_output ); 755 $this->assertNot Equals( $original_output, $processed_output );755 $this->assertNotSame( $original_output, $processed_output ); 756 756 757 757 $this->assertStringContainsString( '<!DOCTYPE html>', $processed_output, 'Expected processed output to contain string.' ); -
trunk/tests/phpunit/tests/term/wpInsertTerm.php
r63616 r63880 845 845 $this->assertIsInt( $t1 ); 846 846 $this->assertIsInt( $t2 ); 847 $this->assertNot Equals( $t1, $t2 );847 $this->assertNotSame( $t1, $t2 ); 848 848 849 849 $term_2 = get_term( $t2, 'wptests_tax' ); -
trunk/tests/phpunit/tests/theme/themeDir.php
r58264 r63880 314 314 315 315 foreach ( $GLOBALS['wp_theme_directories'] as $dir ) { 316 $this->assertNot Equals( '/', substr( $dir, -1 ) );316 $this->assertNotSame( '/', substr( $dir, -1 ) ); 317 317 } 318 318
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)