Changeset 54861 for trunk/tests/phpunit/tests/functions.php
- Timestamp:
- 11/22/2022 03:02:26 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions.php
r54724 r54861 2067 2067 2068 2068 /** 2069 * @ticket 494122070 * @covers ::wp_filesize2071 */2072 function test_wp_filesize_with_nonexistent_file() {2073 $file = 'nonexistent/file.jpg';2074 $this->assertSame( 0, wp_filesize( $file ) );2075 }2076 2077 /**2078 * @ticket 494122079 * @covers ::wp_filesize2080 */2081 function test_wp_filesize() {2082 $file = DIR_TESTDATA . '/images/test-image-upside-down.jpg';2083 2084 $this->assertSame( filesize( $file ), wp_filesize( $file ) );2085 2086 $filter = function() {2087 return 999;2088 };2089 2090 add_filter( 'wp_filesize', $filter );2091 2092 $this->assertSame( 999, wp_filesize( $file ) );2093 2094 $pre_filter = function() {2095 return 111;2096 };2097 2098 add_filter( 'pre_wp_filesize', $pre_filter );2099 2100 $this->assertSame( 111, wp_filesize( $file ) );2101 }2102 2103 /**2104 2069 * @ticket 55505 2105 2070 * @covers ::wp_recursive_ksort
Note: See TracChangeset
for help on using the changeset viewer.