mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00: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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user