Canonical: Don't skip tests if the test data is invalid.
See #40533 git-svn-id: https://develop.svn.wordpress.org/trunk@40517 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
58b60158c7
commit
2eb8cb7ca2
@ -168,7 +168,7 @@ class WP_Canonical_UnitTestCase extends WP_UnitTestCase {
|
|||||||
$expected = array( 'qv' => $expected );
|
$expected = array( 'qv' => $expected );
|
||||||
|
|
||||||
if ( !isset($expected['url']) && !isset($expected['qv']) )
|
if ( !isset($expected['url']) && !isset($expected['qv']) )
|
||||||
$this->markTestSkipped('No valid expected output was provided');
|
$this->fail( 'No valid expected output was provided' );
|
||||||
|
|
||||||
$this->go_to( home_url( $test_url ) );
|
$this->go_to( home_url( $test_url ) );
|
||||||
|
|
||||||
@ -181,6 +181,7 @@ class WP_Canonical_UnitTestCase extends WP_UnitTestCase {
|
|||||||
$this->assertEquals( $expected['url'], $parsed_can_url['path'] . (!empty($parsed_can_url['query']) ? '?' . $parsed_can_url['query'] : ''), $ticket_ref );
|
$this->assertEquals( $expected['url'], $parsed_can_url['path'] . (!empty($parsed_can_url['query']) ? '?' . $parsed_can_url['query'] : ''), $ticket_ref );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the test data doesn't include expected query vars, then we're done here
|
||||||
if ( ! isset($expected['qv']) )
|
if ( ! isset($expected['qv']) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user