Make WordPress Core


Ignore:
Timestamp:
02/08/2021 08:56:35 PM (5 years ago)
Author:
desrosj
Message:

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

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

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

Location:
branches/4.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0

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

    r32148 r50248  
    3636
    3737    /**
    38      * Helper assertion for testing alpha on images
     38     * Helper assertion for testing alpha on images using GD library
    3939     *
    4040     * @param  string $image_path
     
    4242     * @param  int $alpha
    4343     */
    44     protected function assertImageAlphaAtPoint( $image_path, $point, $alpha ) {
     44    protected function assertImageAlphaAtPointGD( $image_path, $point, $alpha ) {
    4545        $im = imagecreatefrompng( $image_path );
    4646        $rgb = imagecolorat( $im, $point[0], $point[1] );
     
    4949
    5050        $this->assertEquals( $alpha, $colors['alpha'] );
     51    }
     52
     53    /**
     54     * Helper assertion for testing alpha on images using Imagick
     55     *
     56     * @param string $image_path
     57     * @param array $point      array(x,y)
     58     * @param int $expected
     59     */
     60    protected function assertImageAlphaAtPointImagick( $image_path, $point, $expected ) {
     61        $im = new Imagick( $image_path );
     62        $pixel = $im->getImagePixelColor( $point[0], $point[1] );
     63        $color = $pixel->getColorValue( imagick::COLOR_ALPHA );
     64        $this->assertEquals( $expected, $color );
    5165    }
    5266
Note: See TracChangeset for help on using the changeset viewer.