Make WordPress Core


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

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

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

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

Location:
branches/3.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.8

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

    r47338 r50250  
    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
    4848        $im = imagecreatefrompng( $image_path );
     
    5353        $this->assertEquals( $alpha, $colors['alpha'] );
    5454    }
     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    }
    5569}
Note: See TracChangeset for help on using the changeset viewer.