Make WordPress Core


Ignore:
Timestamp:
02/08/2021 08:57:07 PM (6 years ago)
Author:
desrosj
Message:

Build/Test Tools: Backport the local Docker environment to the 3.9 branch.

This commit introduces the Docker-based local WordPress development environment to the 3.9 branch.

Merges [44176,45445,45745,45762,45783-45784,45800,45819,45885,46320,46999,47225,47912,48121,49267,49335,49358,49360,49362] to the 3.9 branch.
See #48301, #47767.

Location:
branches/3.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.9

  • branches/3.9/tests/phpunit/tests/image/base.php

    r47329 r50249  
    3838
    3939        /**
    40          * Helper assertion for testing alpha on images
     40         * Helper assertion for testing alpha on images using GD library
    4141         *
    4242         * @param  string $image_path
     
    4444         * @param  int $alpha
    4545         */
    46         protected function assertImageAlphaAtPoint( $image_path, $point, $alpha ) {
     46        protected function assertImageAlphaAtPointGD( $image_path, $point, $alpha ) {
    4747                $im = imagecreatefrompng( $image_path );
    4848                $rgb = imagecolorat( $im, $point[0], $point[1] );
     
    5151
    5252                $this->assertEquals( $alpha, $colors['alpha'] );
     53        }
     54
     55        /**
     56         * Helper assertion for testing alpha on images using Imagick
     57         *
     58         * @param string $image_path
     59         * @param array $point      array(x,y)
     60         * @param int $expected
     61         */
     62        protected function assertImageAlphaAtPointImagick( $image_path, $point, $expected ) {
     63                $im = new Imagick( $image_path );
     64                $pixel = $im->getImagePixelColor( $point[0], $point[1] );
     65                $color = $pixel->getColorValue( imagick::COLOR_ALPHA );
     66                $this->assertEquals( $expected, $color );
    5367        }
    5468
Note: See TracChangeset for help on using the changeset viewer.