diff --git a/tests/phpunit/includes/testcase-canonical.php b/tests/phpunit/includes/testcase-canonical.php index e0b93c8511..2ffbc982eb 100644 --- a/tests/phpunit/includes/testcase-canonical.php +++ b/tests/phpunit/includes/testcase-canonical.php @@ -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;