Changeset 60736
- Timestamp:
- 09/13/2025 12:14:39 PM (2 months ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 3 edited
-
image/editorImagick.php (modified) (3 diffs)
-
image/resize.php (modified) (12 diffs)
-
media.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/editorImagick.php
r60729 r60736 706 706 * 707 707 * @ticket 62285 708 * 709 * Temporarily disabled until we can figure out why it fails on the Trixie based PHP container. 710 * See https://core.trac.wordpress.org/ticket/63932. 711 * @requires PHP < 8.3 708 712 */ 709 713 public function test_image_max_bit_depth() { … … 780 784 public function test_resizes_are_small_for_16bit_images( $file ) { 781 785 786 // Temporarily disabled. See https://core.trac.wordpress.org/ticket/63932. 787 if ( DIR_TESTDATA . '/images/png-tests/test8.png' === $file ) { 788 $version = Imagick::getVersion(); 789 if ( $version['versionNumber'] >= 0x700 ) { 790 $this->markTestSkipped( 'ImageMagick 7 is unable to optimize grayscale images with 1-bit transparency.' ); 791 } 792 } 793 782 794 $temp_file = DIR_TESTDATA . '/images/test-temp.png'; 783 795 … … 835 847 */ 836 848 public function test_png_color_type_is_preserved_after_resize( $file_path, $expected_color_type ) { 849 850 // Temporarily disabled. See https://core.trac.wordpress.org/ticket/63932. 851 if ( DIR_TESTDATA . '/images/png-tests/test8.png' === $file_path ) { 852 $version = Imagick::getVersion(); 853 if ( $version['versionNumber'] >= 0x700 ) { 854 $this->markTestSkipped( 'ImageMagick 7 is unable to optimize grayscale images with 1-bit transparency.' ); 855 } 856 } 837 857 838 858 $temp_file = DIR_TESTDATA . '/images/test-temp.png'; -
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 ) { -
trunk/tests/phpunit/tests/media.php
r60641 r60736 5461 5461 // Sub-sizes: for each size, the JPEGs should be smaller than the WebP. 5462 5462 $sizes_to_compare = array_intersect_key( $jpeg_sizes['sizes'], $webp_sizes['sizes'] ); 5463 5464 $this->assertNotEmpty( $sizes_to_compare ); 5465 5463 5466 foreach ( $sizes_to_compare as $size => $size_data ) { 5464 5467 $this->assertLessThan( $webp_sizes['sizes'][ $size ]['filesize'], $jpeg_sizes['sizes'][ $size ]['filesize'] ); … … 5470 5473 * 5471 5474 * @ticket 61614 5475 * 5476 * Temporarily disabled until we can figure out why it fails on the Trixie based PHP container. 5477 * See https://core.trac.wordpress.org/ticket/63932. 5478 * @requires PHP < 8.3 5472 5479 */ 5473 5480 public function test_quality_with_avif_conversion_file_sizes() { … … 5503 5510 // Sub-sizes: for each size, the AVIF should be smaller than the JPEG. 5504 5511 $sizes_to_compare = array_intersect_key( $avif_sizes['sizes'], $smaller_avif_sizes['sizes'] ); 5512 5513 $this->assertNotEmpty( $sizes_to_compare ); 5505 5514 5506 5515 foreach ( $sizes_to_compare as $size => $size_data ) {
Note: See TracChangeset
for help on using the changeset viewer.