Changeset 60749 for branches/6.4/tests/phpunit/tests/image/resize.php
- Timestamp:
- 09/15/2025 08:05:38 PM (3 months ago)
- Location:
- branches/6.4
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/image/resize.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.4
- Property svn:mergeinfo changed
/trunk merged: 60735-60736
- Property svn:mergeinfo changed
-
branches/6.4/tests/phpunit/tests/image/resize.php
r54226 r60749 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 … … 100 104 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 128, 96 ); 101 105 106 $this->assertNotWPError( $image ); 107 102 108 list( $w, $h, $type ) = getimagesize( $image ); 103 109 … … 113 119 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 128, 0 ); 114 120 121 $this->assertNotWPError( $image ); 122 115 123 list( $w, $h, $type ) = getimagesize( $image ); 116 124 … … 126 134 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 0, 96 ); 127 135 136 $this->assertNotWPError( $image ); 137 128 138 list( $w, $h, $type ) = getimagesize( $image ); 129 139 … … 139 149 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 150, 150, true ); 140 150 151 $this->assertNotWPError( $image ); 152 141 153 list( $w, $h, $type ) = getimagesize( $image ); 142 154 … … 164 176 public function test_resize_thumb_50x150_crop() { 165 177 $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 50, 150, true ); 178 179 $this->assertNotWPError( $image ); 166 180 167 181 list( $w, $h, $type ) = getimagesize( $image ); … … 189 203 /** 190 204 * Function to help out the tests 205 * 206 * @return string|WP_Error The path to the resized image file or a WP_Error on failure. 191 207 */ 192 208 protected function resize_helper( $file, $width, $height, $crop = false ) {
Note: See TracChangeset
for help on using the changeset viewer.