mirror of
git://develop.git.wordpress.org/
synced 2025-01-19 05:38:07 +01:00
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 git-svn-id: https://develop.svn.wordpress.org/trunk@52390 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
029bea45b0
commit
7c0f7cbbda
@ -45,7 +45,14 @@ abstract class WP_Test_REST_Controller_Testcase extends WP_Test_REST_TestCase {
|
||||
}
|
||||
|
||||
// Make sure path for rest_url has a leading slash for proper resolution.
|
||||
$this->assertTrue( 0 === strpos( $path, '/' ), 'REST API URL should have a leading slash.' );
|
||||
if ( 0 !== strpos( $path, '/' ) ) {
|
||||
$this->fail(
|
||||
sprintf(
|
||||
'REST API URL "%s" should have a leading slash.',
|
||||
$path
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user