From 0bbfc95f3cd2687fc8eb0c1d8f100b8eae6fb8c1 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 30 May 2011 18:58:07 +0000 Subject: [PATCH] add broken test to broken group (not incomplete) This test suite really needs to be fixed, marking them as incomplete does not let us tests them easily. Instead, I have added them to the Broken group thus we can easily run them and do not break the continuous integration system. --- tests/phpunit/includes/api/ApiWatchTest.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/phpunit/includes/api/ApiWatchTest.php b/tests/phpunit/includes/api/ApiWatchTest.php index ea8c43816f..cd35a5b856 100644 --- a/tests/phpunit/includes/api/ApiWatchTest.php +++ b/tests/phpunit/includes/api/ApiWatchTest.php @@ -5,6 +5,7 @@ require_once dirname( __FILE__ ) . '/ApiSetup.php'; /** * @group Database * @group Destructive + * @todo This test suite is severly broken and need a full review */ class ApiWatchTest extends ApiTestSetup { @@ -17,11 +18,13 @@ class ApiWatchTest extends ApiTestSetup { return $this->getTokenList( $this->sysopUser ); } + /** + * @group Broken + */ function testWatchEdit() { $data = $this->getTokens(); - $this->markTestIncomplete( "Broken" ); $keys = array_keys( $data[0]['query']['pages'] ); $key = array_pop( $keys ); $pageinfo = $data[0]['query']['pages'][$key]; @@ -68,12 +71,13 @@ class ApiWatchTest extends ApiTestSetup { return $data; } - + /** + * @group Broken + */ function testWatchProtect() { $data = $this->getTokens(); - $this->markTestIncomplete( "Broken" ); $keys = array_keys( $data[0]['query']['pages'] ); $key = array_pop( $keys ); $pageinfo = $data[0]['query']['pages'][$key]; @@ -125,6 +129,7 @@ class ApiWatchTest extends ApiTestSetup { /** * @depends testGetRollbackToken + * @group Broken */ function testWatchRollback( $data ) { $keys = array_keys( $data[0]['query']['pages'] ); @@ -142,7 +147,7 @@ class ApiWatchTest extends ApiTestSetup { if( $ue->getCodeString() == 'onlyauthor' ) { $this->markTestIncomplete( "Only one author to 'UTPage', cannot test rollback" ); } else { - $this->fail( "Received error " . $ue->getCodeString() ); + $this->fail( "Received error '" . $ue->getCodeString() . "'" ); } } @@ -150,12 +155,13 @@ class ApiWatchTest extends ApiTestSetup { $this->assertArrayHasKey( 'title', $data[0]['rollback'] ); } - + /** + * @group Broken + */ function testWatchDelete() { $data = $this->getTokens(); - $this->markTestIncomplete( "Broken" ); $keys = array_keys( $data[0]['query']['pages'] ); $key = array_pop( $keys ); $pageinfo = $data[0]['query']['pages'][$key]; -- 2.20.1