diff --git a/tests/phpunit/tests/rest-api/rest-attachments-controller.php b/tests/phpunit/tests/rest-api/rest-attachments-controller.php index 5fd0b46c6f..b4115d41e7 100644 --- a/tests/phpunit/tests/rest-api/rest-attachments-controller.php +++ b/tests/phpunit/tests/rest-api/rest-attachments-controller.php @@ -583,6 +583,9 @@ class WP_Test_REST_Attachments_Controller extends WP_Test_REST_Post_Type_Control $this->assertSame( 'image/jpeg', $data['mime_type'] ); } + /** + * @requires function imagejpeg + */ public function test_get_item_sizes() { $attachment_id = $this->factory->attachment->create_object( $this->test_file, @@ -611,6 +614,9 @@ class WP_Test_REST_Attachments_Controller extends WP_Test_REST_Post_Type_Control $this->assertSame( 'image/jpeg', $data['media_details']['sizes']['full']['mime_type'] ); } + /** + * @requires function imagejpeg + */ public function test_get_item_sizes_with_no_url() { $attachment_id = $this->factory->attachment->create_object( $this->test_file, @@ -1944,6 +1950,7 @@ class WP_Test_REST_Attachments_Controller extends WP_Test_REST_Post_Type_Control /** * @ticket 44405 + * @requires function imagejpeg */ public function test_edit_image() { wp_set_current_user( self::$superadmin_id );