Make WordPress Core

Changeset 49047


Ignore:
Timestamp:
09/25/2020 02:21:33 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Tests: Require imagejpeg() function in some REST API attachments controller tests.

This outputs a proper message if the requirement is not met, instead of an obscure failure further in the test.

These tests rely on multiple resized copies of a test JPEG image being generated and available.

Follow-up to [49010], [49024], [49025], [49045].

See #50639, #50640.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php

    r49046 r49047  
    584584        }
    585585
     586        /**
     587         * @requires function imagejpeg
     588         */
    586589        public function test_get_item_sizes() {
    587590                $attachment_id = $this->factory->attachment->create_object(
    … …  
    612615        }
    613616
     617        /**
     618         * @requires function imagejpeg
     619         */
    614620        public function test_get_item_sizes_with_no_url() {
    615621                $attachment_id = $this->factory->attachment->create_object(
    … …  
    19451951        /**
    19461952         * @ticket 44405
     1953         * @requires function imagejpeg
    19471954         */
    19481955        public function test_edit_image() {
Note: See TracChangeset for help on using the changeset viewer.