Changeset 60736 for trunk/tests/phpunit/tests/image/resize.php
- Timestamp:
- 09/13/2025 12:14:39 PM (3 months ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/image/resize.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/resize.php
r58849 r60736 24 24 $image = $this->resize_helper( DIR_TESTDATA . '/images/test-image.jpg', 25, 25 ); 25 25 26 $this->assertNotWPError( $image ); 27 26 28 list( $w, $h, $type ) = getimagesize( $image ); 27 29 … … 79 81 $image = $this->resize_helper( $file, 25, 25 ); 80 82 83 $this->assertNotWPError( $image ); 84 81 85 list( $w, $h, $type ) = wp_getimagesize( $image ); 82 86 … … 93 97 * 94 98 * @ticket 51228 99 * 100 * Temporarily disabled until we can figure out why it fails on the Trixie based PHP container. 101 * See https://core.trac.wordpress.org/ticket/63932. 102 * @requires PHP < 8.3 95 103 */ 96 104 public function test_resize_avif() { … … 105 113 $image = $this->resize_helper( $file, 25, 25 ); 106 114 115 $this->assertNotWPError( $image ); 116 107 117 list( $w, $h, $type ) = wp_getimagesize( $image ); 108 118 … … 131 141 $image = $this->resize_helper( $file, 25, 25 ); 132 142 143 $this->assertNotWPError( $image ); 144 133 145 list( $w, $h, $type ) = wp_getimagesize( $image ); 134 146 … … 152 164 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 128, 96 ); 153 165 166 $this->assertNotWPError( $image ); 167 154 168 list( $w, $h, $type ) = getimagesize( $image ); 155 169 … … 165 179 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 128, 0 ); 166 180 181 $this->assertNotWPError( $image ); 182 167 183 list( $w, $h, $type ) = getimagesize( $image ); 168 184 … … 178 194 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 0, 96 ); 179 195 196 $this->assertNotWPError( $image ); 197 180 198 list( $w, $h, $type ) = getimagesize( $image ); 181 199 … … 191 209 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 150, 150, true ); 192 210 211 $this->assertNotWPError( $image ); 212 193 213 list( $w, $h, $type ) = getimagesize( $image ); 194 214 … … 204 224 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 150, 100, true ); 205 225 226 $this->assertNotWPError( $image ); 227 206 228 list( $w, $h, $type ) = getimagesize( $image ); 207 229 … … 217 239 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 50, 150, true ); 218 240 241 $this->assertNotWPError( $image ); 242 219 243 list( $w, $h, $type ) = getimagesize( $image ); 220 244 … … 241 265 /** 242 266 * Function to help out the tests 267 * 268 * @return string|WP_Error The path to the resized image file or a WP_Error on failure. 243 269 */ 244 270 protected function resize_helper( $file, $width, $height, $crop = false ) {
Note: See TracChangeset
for help on using the changeset viewer.