Make WordPress Core

Changeset 52390


Ignore:
Timestamp:
12/19/2021 02:27:22 PM (3 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Remove the assertion in filter_rest_url_for_leading_slash().

This assertion can mask the fact that some other tests don't perform an assertion.

Fixes #54661

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase-rest-controller.php

    r51568 r52390  
    4646
    4747        // Make sure path for rest_url has a leading slash for proper resolution.
    48         $this->assertTrue( 0 === strpos( $path, '/' ), 'REST API URL should have a leading slash.' );
     48        if ( 0 !== strpos( $path, '/' ) ) {
     49            $this->fail(
     50                sprintf(
     51                    'REST API URL "%s" should have a leading slash.',
     52                    $path
     53                )
     54            );
     55        }
    4956
    5057        return $url;
Note: See TracChangeset for help on using the changeset viewer.