diff --git a/composer.json b/composer.json index 9c8549bea7..347feff8d0 100644 --- a/composer.json +++ b/composer.json @@ -81,7 +81,9 @@ "lint:webp-uploads": "@lint -- ./plugins/webp-uploads --standard=./plugins/webp-uploads/phpcs.xml.dist", "phpstan": "phpstan analyse --memory-limit=2048M", "test": "phpunit", - "test-multisite": "@test -c tests/multisite.xml", + "test-multisite": [ + "WP_MULTISITE=1 phpunit --exclude-group=ms-excluded" + ], "test-multisite:plugins": [ "@test-multisite:auto-sizes", "@test-multisite:dominant-color-images", diff --git a/plugins/dominant-color-images/tests/data/class-testcase.php b/plugins/dominant-color-images/tests/data/class-testcase.php index 9f39c3111d..966b29f473 100644 --- a/plugins/dominant-color-images/tests/data/class-testcase.php +++ b/plugins/dominant-color-images/tests/data/class-testcase.php @@ -175,6 +175,14 @@ public function test_get_dominant_color_valid( string $image_path, array $expect * @dataProvider provider_get_dominant_color_invalid_images */ public function test_get_dominant_color_invalid( string $image_path ): void { + $mime_type = wp_check_filetype( $image_path )['type']; + // Old WP does not support ".tiff" and ".bmp" so return false. + if ( ! $mime_type ) { + $this->markTestSkipped( 'Mime type is not supported.' ); + } + if ( ! wp_image_editor_supports( array( 'mime_type' => $mime_type ) ) ) { + $this->markTestSkipped( "Mime type $mime_type is not supported." ); + } $attachment_id = self::factory()->attachment->create_upload_object( $image_path ); wp_maybe_generate_attachment_metadata( get_post( $attachment_id ) ); diff --git a/tests/multisite.xml b/tests/multisite.xml deleted file mode 100644 index 8f03b47fbe..0000000000 --- a/tests/multisite.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - ./ - ./utils - ./plugins - - - ./plugins/auto-sizes - - - ./plugins/speculation-rules - - - - - ms-excluded - - -