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:
John Blackbourn 2017-04-22 17:29:03 +00:00
parent 58b60158c7
commit 2eb8cb7ca2
1 changed files with 2 additions and 1 deletions

View File

@ -168,7 +168,7 @@ class WP_Canonical_UnitTestCase extends WP_UnitTestCase {
$expected = array( 'qv' => $expected );
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 ) );
@ -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 );
}
// If the test data doesn't include expected query vars, then we're done here
if ( ! isset($expected['qv']) )
return;