Changeset 50251
- Timestamp:
- 02/08/2021 08:58:53 PM (4 years ago)
- Location:
- branches/3.7
- Files:
-
- 11 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7
- 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.7/package-lock.json
r50224 r50251 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.22", … … 235 271 "dev": true 236 272 }, 273 "axios": { 274 "version": "0.21.1", 275 "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", 276 "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", 277 "dev": true, 278 "requires": { 279 "follow-redirects": "^1.10.0" 280 } 281 }, 237 282 "balanced-match": { 238 283 "version": "1.0.0", … … 680 725 "dev": true 681 726 }, 727 "dotenv": { 728 "version": "8.2.0", 729 "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", 730 "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", 731 "dev": true 732 }, 733 "dotenv-expand": { 734 "version": "5.1.0", 735 "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", 736 "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", 737 "dev": true 738 }, 682 739 "duplexer": { 683 740 "version": "0.1.2", … … 1036 1093 "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", 1037 1094 "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", 1095 "dev": true 1096 }, 1097 "follow-redirects": { 1098 "version": "1.13.2", 1099 "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz", 1100 "integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==", 1038 1101 "dev": true 1039 1102 }, … … 2057 2120 "dev": true 2058 2121 }, 2122 "joi": { 2123 "version": "17.4.0", 2124 "resolved": "https://registry.npmjs.org/joi/-/joi-17.4.0.tgz", 2125 "integrity": "sha512-F4WiW2xaV6wc1jxete70Rw4V/VuMd6IN+a5ilZsxG4uYtUXWu2kq9W5P2dz30e7Gmw8RCbY/u/uk+dMPma9tAg==", 2126 "dev": true, 2127 "requires": { 2128 "@hapi/hoek": "^9.0.0", 2129 "@hapi/topo": "^5.0.0", 2130 "@sideway/address": "^4.1.0", 2131 "@sideway/formula": "^3.0.0", 2132 "@sideway/pinpoint": "^2.0.0" 2133 } 2134 }, 2059 2135 "js-yaml": { 2060 2136 "version": "3.14.1", … … 2361 2437 "brace-expansion": "^1.1.7" 2362 2438 } 2439 }, 2440 "minimist": { 2441 "version": "1.2.5", 2442 "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 2443 "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 2444 "dev": true 2363 2445 }, 2364 2446 "mitt": { … … 3363 3445 } 3364 3446 }, 3447 "tslib": { 3448 "version": "1.14.1", 3449 "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 3450 "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", 3451 "dev": true 3452 }, 3365 3453 "tunnel-agent": { 3366 3454 "version": "0.6.0", … … 3521 3609 } 3522 3610 }, 3611 "wait-on": { 3612 "version": "5.2.1", 3613 "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-5.2.1.tgz", 3614 "integrity": "sha512-H2F986kNWMU9hKlI9l/ppO6tN8ZSJd35yBljMLa1/vjzWP++Qh6aXyt77/u7ySJFZQqBtQxnvm/xgG48AObXcw==", 3615 "dev": true, 3616 "requires": { 3617 "axios": "^0.21.1", 3618 "joi": "^17.3.0", 3619 "lodash": "^4.17.20", 3620 "minimist": "^1.2.5", 3621 "rxjs": "^6.6.3" 3622 }, 3623 "dependencies": { 3624 "rxjs": { 3625 "version": "6.6.3", 3626 "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", 3627 "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", 3628 "dev": true, 3629 "requires": { 3630 "tslib": "^1.9.0" 3631 } 3632 } 3633 } 3634 }, 3523 3635 "websocket-driver": { 3524 3636 "version": "0.7.4", -
branches/3.7/package.json
r50224 r50251 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", … … 25 27 "grunt-legacy-util": "^2.0.0", 26 28 "grunt-patch-wordpress": "~3.0.0", 27 "matchdep": "~2.0.0" 29 "matchdep": "~2.0.0", 30 "wait-on": "5.2.1" 31 }, 32 "scripts": { 33 "build": "grunt build", 34 "test": "grunt test", 35 "watch": "grunt watch", 36 "grunt": "grunt", 37 "env:start": "node ./tools/local-env/scripts/start.js", 38 "env:stop": "node ./tools/local-env/scripts/docker.js down", 39 "env:restart": "npm run env:stop && npm run env:start", 40 "env:clean": "node ./tools/local-env/scripts/docker.js down -v --remove-orphans", 41 "env:reset": "node ./tools/local-env/scripts/docker.js down --rmi all -v --remove-orphans", 42 "env:install": "node ./tools/local-env/scripts/install.js", 43 "env:cli": "node ./tools/local-env/scripts/docker.js run cli", 44 "env:logs": "node ./tools/local-env/scripts/docker.js logs", 45 "env:pull": "node ./tools/local-env/scripts/docker.js pull", 46 "test:php": "node ./tools/local-env/scripts/docker.js run --rm phpunit phpunit" 28 47 } 29 48 } -
branches/3.7/src
- Property svn:mergeinfo changed
/trunk/src merged: 45445,48121
- Property svn:mergeinfo changed
-
branches/3.7/tests/phpunit/tests/image/base.php
r47343 r50251 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.7/tests/phpunit/tests/image/editor_gd.php
r47343 r50251 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.7/tests/phpunit/tests/image/editor_imagick.php
r47343 r50251 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.