Changeset 50250 for branches/3.8
- Timestamp:
- 02/08/2021 08:57:54 PM (4 years ago)
- Location:
- branches/3.8
- Files:
-
- 11 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8
- Property svn:mergeinfo changed
/branches/5.0 merged: 43836 /trunk merged: 44176,45445,45745,45762,45783-45784,45800,45819,45885,46320,46999,47225,47912,48121,49267,49335,49358,49360,49362
- Property svn:mergeinfo changed
-
branches/3.8/package-lock.json
r50222 r50250 5 5 "requires": true, 6 6 "dependencies": { 7 "@hapi/hoek": { 8 "version": "9.1.1", 9 "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.1.1.tgz", 10 "integrity": "sha512-CAEbWH7OIur6jEOzaai83jq3FmKmv4PmX1JYfs9IrYcGEVI/lyL1EXJGCj7eFVJ0bg5QR8LMxBlEtA+xKiLpFw==", 11 "dev": true 12 }, 13 "@hapi/topo": { 14 "version": "5.0.0", 15 "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.0.0.tgz", 16 "integrity": "sha512-tFJlT47db0kMqVm3H4nQYgn6Pwg10GTZHb1pwmSiv1K4ks6drQOtfEF5ZnPjkvC+y4/bUPHK+bc87QvLcL+WMw==", 17 "dev": true, 18 "requires": { 19 "@hapi/hoek": "^9.0.0" 20 } 21 }, 22 "@sideway/address": { 23 "version": "4.1.1", 24 "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.1.tgz", 25 "integrity": "sha512-+I5aaQr3m0OAmMr7RQ3fR9zx55sejEYR2BFJaxL+zT3VM2611X0SHvPWIbAUBZVTn/YzYKbV8gJ2oT/QELknfQ==", 26 "dev": true, 27 "requires": { 28 "@hapi/hoek": "^9.0.0" 29 } 30 }, 31 "@sideway/formula": { 32 "version": "3.0.0", 33 "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz", 34 "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==", 35 "dev": true 36 }, 37 "@sideway/pinpoint": { 38 "version": "2.0.0", 39 "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", 40 "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", 41 "dev": true 42 }, 7 43 "@types/node": { 8 44 "version": "14.14.25", … … 245 281 "dev": true 246 282 }, 283 "axios": { 284 "version": "0.21.1", 285 "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", 286 "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", 287 "dev": true, 288 "requires": { 289 "follow-redirects": "^1.10.0" 290 } 291 }, 247 292 "balanced-match": { 248 293 "version": "1.0.0", … … 836 881 } 837 882 }, 883 "dotenv": { 884 "version": "8.2.0", 885 "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", 886 "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", 887 "dev": true 888 }, 889 "dotenv-expand": { 890 "version": "5.1.0", 891 "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", 892 "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", 893 "dev": true 894 }, 838 895 "duplexer": { 839 896 "version": "0.1.2", … … 1198 1255 "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", 1199 1256 "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", 1257 "dev": true 1258 }, 1259 "follow-redirects": { 1260 "version": "1.13.2", 1261 "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz", 1262 "integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==", 1200 1263 "dev": true 1201 1264 }, … … 2320 2383 "dev": true 2321 2384 }, 2385 "joi": { 2386 "version": "17.4.0", 2387 "resolved": "https://registry.npmjs.org/joi/-/joi-17.4.0.tgz", 2388 "integrity": "sha512-F4WiW2xaV6wc1jxete70Rw4V/VuMd6IN+a5ilZsxG4uYtUXWu2kq9W5P2dz30e7Gmw8RCbY/u/uk+dMPma9tAg==", 2389 "dev": true, 2390 "requires": { 2391 "@hapi/hoek": "^9.0.0", 2392 "@hapi/topo": "^5.0.0", 2393 "@sideway/address": "^4.1.0", 2394 "@sideway/formula": "^3.0.0", 2395 "@sideway/pinpoint": "^2.0.0" 2396 } 2397 }, 2322 2398 "js-yaml": { 2323 2399 "version": "3.14.1", … … 2640 2716 "brace-expansion": "^1.1.7" 2641 2717 } 2718 }, 2719 "minimist": { 2720 "version": "1.2.5", 2721 "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 2722 "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 2723 "dev": true 2642 2724 }, 2643 2725 "mitt": { … … 3678 3760 } 3679 3761 }, 3762 "tslib": { 3763 "version": "1.14.1", 3764 "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 3765 "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", 3766 "dev": true 3767 }, 3680 3768 "tunnel-agent": { 3681 3769 "version": "0.6.0", … … 3836 3924 } 3837 3925 }, 3926 "wait-on": { 3927 "version": "5.2.1", 3928 "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-5.2.1.tgz", 3929 "integrity": "sha512-H2F986kNWMU9hKlI9l/ppO6tN8ZSJd35yBljMLa1/vjzWP++Qh6aXyt77/u7ySJFZQqBtQxnvm/xgG48AObXcw==", 3930 "dev": true, 3931 "requires": { 3932 "axios": "^0.21.1", 3933 "joi": "^17.3.0", 3934 "lodash": "^4.17.20", 3935 "minimist": "^1.2.5", 3936 "rxjs": "^6.6.3" 3937 }, 3938 "dependencies": { 3939 "rxjs": { 3940 "version": "6.6.3", 3941 "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", 3942 "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", 3943 "dev": true, 3944 "requires": { 3945 "tslib": "^1.9.0" 3946 } 3947 } 3948 } 3949 }, 3838 3950 "websocket-driver": { 3839 3951 "version": "0.7.4", -
branches/3.8/package.json
r50222 r50250 14 14 "license": "GPLv2 or later", 15 15 "devDependencies": { 16 "dotenv": "^8.2.0", 17 "dotenv-expand": "^5.1.0", 16 18 "grunt": "~1.3.0", 17 19 "grunt-contrib-clean": "~2.0.0", … … 29 31 "grunt-sass": "~3.1.0", 30 32 "matchdep": "~2.0.0", 31 "sass": "^1.32.6" 33 "sass": "^1.32.6", 34 "wait-on": "5.2.1" 35 }, 36 "scripts": { 37 "build": "grunt build", 38 "test": "grunt test", 39 "watch": "grunt watch", 40 "grunt": "grunt", 41 "env:start": "node ./tools/local-env/scripts/start.js", 42 "env:stop": "node ./tools/local-env/scripts/docker.js down", 43 "env:restart": "npm run env:stop && npm run env:start", 44 "env:clean": "node ./tools/local-env/scripts/docker.js down -v --remove-orphans", 45 "env:reset": "node ./tools/local-env/scripts/docker.js down --rmi all -v --remove-orphans", 46 "env:install": "node ./tools/local-env/scripts/install.js", 47 "env:cli": "node ./tools/local-env/scripts/docker.js run cli", 48 "env:logs": "node ./tools/local-env/scripts/docker.js logs", 49 "env:pull": "node ./tools/local-env/scripts/docker.js pull", 50 "test:php": "node ./tools/local-env/scripts/docker.js run --rm phpunit phpunit" 32 51 } 33 52 } -
branches/3.8/tests/phpunit/tests/image/base.php
r47338 r50250 38 38 39 39 /** 40 * Helper assertion for testing alpha on images 40 * Helper assertion for testing alpha on images using GD library 41 41 * 42 42 * @param string $image_path … … 44 44 * @param int $alpha 45 45 */ 46 protected function assertImageAlphaAtPoint ( $image_path, $point, $alpha ) {46 protected function assertImageAlphaAtPointGD( $image_path, $point, $alpha ) { 47 47 48 48 $im = imagecreatefrompng( $image_path ); … … 53 53 $this->assertEquals( $alpha, $colors['alpha'] ); 54 54 } 55 56 /** 57 * Helper assertion for testing alpha on images using Imagick 58 * 59 * @param string $image_path 60 * @param array $point array(x,y) 61 * @param int $expected 62 */ 63 protected function assertImageAlphaAtPointImagick( $image_path, $point, $expected ) { 64 $im = new Imagick( $image_path ); 65 $pixel = $im->getImagePixelColor( $point[0], $point[1] ); 66 $color = $pixel->getColorValue( imagick::COLOR_ALPHA ); 67 $this->assertEquals( $expected, $color ); 68 } 55 69 } -
branches/3.8/tests/phpunit/tests/image/editor_gd.php
r47338 r50250 33 33 /** 34 34 * Check support for GD compatible mime types. 35 * 35 * 36 36 */ 37 37 public function test_supports_mime_type() { … … 45 45 /** 46 46 * Test resizing an image, not using crop 47 * 47 * 48 48 */ 49 49 public function test_resize() { … … 61 61 /** 62 62 * Test resizing an image including cropping 63 * 63 * 64 64 */ 65 65 public function test_resize_and_crop() { … … 133 133 /** 134 134 * Test the image created with WP_Image_Edior_GD preserves alpha when resizing 135 * 135 * 136 136 * @ticket 23039 137 137 */ … … 144 144 $editor->resize(5,5); 145 145 $save_to_file = tempnam( get_temp_dir(), '' ) . '.png'; 146 146 147 147 $editor->save( $save_to_file ); 148 148 149 $this->assertImageAlphaAtPoint ( $save_to_file, array( 0,0 ), 127 );149 $this->assertImageAlphaAtPointGD( $save_to_file, array( 0,0 ), 127 ); 150 150 151 151 unlink( $save_to_file ); 152 152 } 153 153 154 154 /** 155 155 * Test the image created with WP_Image_Edior_GD preserves alpha with no resizing etc 156 * 156 * 157 157 * @ticket 23039 158 158 */ … … 165 165 166 166 $save_to_file = tempnam( get_temp_dir(), '' ) . '.png'; 167 167 168 168 $editor->save( $save_to_file ); 169 169 170 $this->assertImageAlphaAtPoint ( $save_to_file, array( 0,0 ), 127 );170 $this->assertImageAlphaAtPointGD( $save_to_file, array( 0,0 ), 127 ); 171 171 172 172 unlink( $save_to_file ); -
branches/3.8/tests/phpunit/tests/image/editor_imagick.php
r47338 r50250 39 39 /** 40 40 * Check support for Image Magick compatible mime types. 41 * 41 * 42 42 */ 43 43 public function test_supports_mime_type() { … … 52 52 /** 53 53 * Test resizing an image, not using crop 54 * 54 * 55 55 */ 56 56 public function test_resize() { … … 68 68 /** 69 69 * Test resizing an image including cropping 70 * 70 * 71 71 */ 72 72 public function test_resize_and_crop() { … … 151 151 $editor->resize(5,5); 152 152 $save_to_file = tempnam( get_temp_dir(), '' ) . '.png'; 153 153 154 154 $editor->save( $save_to_file ); 155 155 156 $this->assertImageAlphaAtPoint( $save_to_file, array( 0,0 ), 127 ); 156 $im = new Imagick( $save_to_file ); 157 $pixel = $im->getImagePixelColor( 0, 0 ); 158 $expected = $pixel->getColorValue( imagick::COLOR_ALPHA ); 159 160 $this->assertImageAlphaAtPointImagick( $save_to_file, array( 0,0 ), $expected ); 157 161 158 162 unlink( $save_to_file ); 159 163 } 160 164 161 165 /** 162 166 * Test the image created with WP_Image_Edior_Imagick preserves alpha with no resizing etc … … 175 179 $editor->save( $save_to_file ); 176 180 177 $this->assertImageAlphaAtPoint( $save_to_file, array( 0,0 ), 127 ); 181 $im = new Imagick( $save_to_file ); 182 $pixel = $im->getImagePixelColor( 0, 0 ); 183 $expected = $pixel->getColorValue( imagick::COLOR_ALPHA ); 184 185 $this->assertImageAlphaAtPointImagick( $save_to_file, array( 0,0 ), $expected ); 178 186 179 187 unlink( $save_to_file );
Note: See TracChangeset
for help on using the changeset viewer.