Make WordPress Core


Ignore:
Timestamp:
07/13/2021 10:43:42 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Clean up skipping conditions and requirements for various tests.

This improves the consistency of test skipping and ensures that:

  • The @requires annotations use the right condition and format, and are on the right level (class vs. function).
  • Inline conditions with a markTestSkipped() call are only used when annotations cannot be used.
  • All markTestSkipped() calls contain a verbose explanation of why the test is being skipped.

Props jrf, hellofromTonya.
Fixes #53009.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/ajax/MediaEdit.php

    r49069 r51415  
    1212 * @since      3.5.0
    1313 * @group      ajax
     14 *
     15 * @requires   function imagejpeg
    1416 */
    1517class Tests_Ajax_MediaEdit extends WP_Ajax_UnitTestCase {
     
    2628    /**
    2729     * @ticket 22985
    28      * @requires function imagejpeg
    2930     */
    3031    public function testCropImageThumbnail() {
     
    5657    /**
    5758     * @ticket 32171
    58      * @requires function imagejpeg
    5959     */
    6060    public function testImageEditOverwriteConstant() {
Note: See TracChangeset for help on using the changeset viewer.