Make WordPress Core


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

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

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

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

Location:
branches/3.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.7

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

    r47343 r50251  
    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.