Changeset 54402 for trunk/tests/phpunit/tests/functions.php
- Timestamp:
- 10/07/2022 01:02:07 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions.php
r53934 r54402 2057 2057 */ 2058 2058 public function test_wp_get_default_extension_for_mime_type() { 2059 $this->assert Equals( 'jpg', wp_get_default_extension_for_mime_type( 'image/jpeg' ), 'jpg not returned as default extension for "image/jpeg"' );2059 $this->assertSame( 'jpg', wp_get_default_extension_for_mime_type( 'image/jpeg' ), 'jpg not returned as default extension for "image/jpeg"' ); 2060 2060 $this->assertNotEquals( 'jpeg', wp_get_default_extension_for_mime_type( 'image/jpeg' ), 'jpeg should not be returned as default extension for "image/jpeg"' ); 2061 $this->assert Equals( 'png', wp_get_default_extension_for_mime_type( 'image/png' ), 'png not returned as default extension for "image/png"' );2061 $this->assertSame( 'png', wp_get_default_extension_for_mime_type( 'image/png' ), 'png not returned as default extension for "image/png"' ); 2062 2062 $this->assertFalse( wp_get_default_extension_for_mime_type( 'wibble/wobble' ), 'false not returned for unrecognized mime type' ); 2063 2063 $this->assertFalse( wp_get_default_extension_for_mime_type( '' ), 'false not returned when empty string as mime type supplied' ); … … 2073 2073 function test_wp_filesize_with_nonexistent_file() { 2074 2074 $file = 'nonexistent/file.jpg'; 2075 $this->assert Equals( 0, wp_filesize( $file ) );2075 $this->assertSame( 0, wp_filesize( $file ) ); 2076 2076 } 2077 2077 … … 2083 2083 $file = DIR_TESTDATA . '/images/test-image-upside-down.jpg'; 2084 2084 2085 $this->assert Equals( filesize( $file ), wp_filesize( $file ) );2085 $this->assertSame( filesize( $file ), wp_filesize( $file ) ); 2086 2086 2087 2087 $filter = function() { … … 2091 2091 add_filter( 'wp_filesize', $filter ); 2092 2092 2093 $this->assert Equals( 999, wp_filesize( $file ) );2093 $this->assertSame( 999, wp_filesize( $file ) ); 2094 2094 2095 2095 $pre_filter = function() { … … 2099 2099 add_filter( 'pre_wp_filesize', $pre_filter ); 2100 2100 2101 $this->assert Equals( 111, wp_filesize( $file ) );2101 $this->assertSame( 111, wp_filesize( $file ) ); 2102 2102 } 2103 2103 … … 2185 2185 'version' => 1, 2186 2186 ); 2187 $this->assert Equals( $theme_json, $expected_theme_json );2187 $this->assertSameSetsWithIndex( $theme_json, $expected_theme_json ); 2188 2188 } 2189 2189
Note: See TracChangeset
for help on using the changeset viewer.