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/editor_imagick.php

    r47338 r50250  
    3939    /**
    4040     * Check support for Image Magick compatible mime types.
    41      * 
     41     *
    4242     */
    4343    public function test_supports_mime_type() {
     
    5252    /**
    5353     * Test resizing an image, not using crop
    54      * 
     54     *
    5555     */
    5656    public function test_resize() {
     
    6868    /**
    6969     * Test resizing an image including cropping
    70      * 
     70     *
    7171     */
    7272    public function test_resize_and_crop() {
     
    151151        $editor->resize(5,5);
    152152        $save_to_file = tempnam( get_temp_dir(), '' ) . '.png';
    153        
     153
    154154        $editor->save( $save_to_file );
    155155
    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 );
    157161
    158162        unlink( $save_to_file );
    159163    }
    160    
     164
    161165    /**
    162166     * Test the image created with WP_Image_Edior_Imagick preserves alpha with no resizing etc
     
    175179        $editor->save( $save_to_file );
    176180
    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 );
    178186
    179187        unlink( $save_to_file );
Note: See TracChangeset for help on using the changeset viewer.