Make WordPress Core


Ignore:
Timestamp:
09/15/2025 08:05:38 PM (3 months ago)
Author:
desrosj
Message:

Build/Test Tools: Fix tooling and PHPUnit test issues.

This fixes the PHPUnit test suite for the 6.4 branch by:

  • Fixing issues with the env:install script when using newer PHP images.
  • Temporarily disables failing tests with ImageMagick 7 is in use.

Backports [60735] and [60736] to the 6.4 branch.

See #63876, #63932.

Location:
branches/6.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.4

  • branches/6.4/tests/phpunit/tests/image/resize.php

    r54226 r60749  
    2424        $image = $this->resize_helper( DIR_TESTDATA . '/images/test-image.jpg', 25, 25 );
    2525
     26        $this->assertNotWPError( $image );
     27
    2628        list( $w, $h, $type ) = getimagesize( $image );
    2729
     
    7981        $image = $this->resize_helper( $file, 25, 25 );
    8082
     83        $this->assertNotWPError( $image );
     84
    8185        list( $w, $h, $type ) = wp_getimagesize( $image );
    8286
     
    100104        $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 128, 96 );
    101105
     106        $this->assertNotWPError( $image );
     107
    102108        list( $w, $h, $type ) = getimagesize( $image );
    103109
     
    113119        $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 128, 0 );
    114120
     121        $this->assertNotWPError( $image );
     122
    115123        list( $w, $h, $type ) = getimagesize( $image );
    116124
     
    126134        $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 0, 96 );
    127135
     136        $this->assertNotWPError( $image );
     137
    128138        list( $w, $h, $type ) = getimagesize( $image );
    129139
     
    139149        $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 150, 150, true );
    140150
     151        $this->assertNotWPError( $image );
     152
    141153        list( $w, $h, $type ) = getimagesize( $image );
    142154
     
    164176    public function test_resize_thumb_50x150_crop() {
    165177        $image = $this->resize_helper( DIR_TESTDATA . '/images/2007-06-17DSC_4173.JPG', 50, 150, true );
     178
     179        $this->assertNotWPError( $image );
    166180
    167181        list( $w, $h, $type ) = getimagesize( $image );
     
    189203    /**
    190204     * Function to help out the tests
     205     *
     206     * @return string|WP_Error The path to the resized image file or a WP_Error on failure.
    191207     */
    192208    protected function resize_helper( $file, $width, $height, $crop = false ) {
Note: See TracChangeset for help on using the changeset viewer.