From: Antoine Musso Date: Mon, 2 Apr 2012 13:33:43 +0000 (+0200) Subject: Regroup all API tests in the 'API' PHPUnit group X-Git-Tag: 1.31.0-rc.0~24082 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_modifier.php?a=commitdiff_plain;h=da8ba7c544d815715956c464ba55ead7857377eb;p=lhc%2Fweb%2Fwiklou.git Regroup all API tests in the 'API' PHPUnit group That will let us tests all the API tests by using PHPUnit group filtering such as: php phpunit.php --group API Also cleaned some whitespaces Patchset-4: skipped files that had only whitespace changes Change-Id: I51e03d910521b061f505e3a9b11a08c7b95f1538 --- diff --git a/tests/phpunit/includes/api/ApiBlockTest.php b/tests/phpunit/includes/api/ApiBlockTest.php index 514da42120..d9ea7b5a87 100644 --- a/tests/phpunit/includes/api/ApiBlockTest.php +++ b/tests/phpunit/includes/api/ApiBlockTest.php @@ -1,6 +1,7 @@ doLogin(); } - + function getTokens() { return $this->getTokenList( self::$users['sysop'] ); } @@ -19,9 +20,9 @@ class ApiWatchTest extends ApiTestCase { * @group Broken */ function testWatchEdit() { - + $data = $this->getTokens(); - + $keys = array_keys( $data[0]['query']['pages'] ); $key = array_pop( $keys ); $pageinfo = $data[0]['query']['pages'][$key]; @@ -44,7 +45,7 @@ class ApiWatchTest extends ApiTestCase { * @group Broken */ function testWatchClear() { - + $data = $this->doApiRequest( array( 'action' => 'query', 'list' => 'watchlist' ), $data ); @@ -71,11 +72,11 @@ class ApiWatchTest extends ApiTestCase { /** * @group Broken - */ + */ function testWatchProtect() { - + $data = $this->getTokens(); - + $keys = array_keys( $data[0]['query']['pages'] ); $key = array_pop( $keys ); $pageinfo = $data[0]['query']['pages'][$key]; @@ -97,9 +98,9 @@ class ApiWatchTest extends ApiTestCase { * @group Broken */ function testGetRollbackToken() { - + $data = $this->getTokens(); - + if ( !Title::newFromText( 'UTPage' )->exists() ) { $this->markTestIncomplete( "The article [[UTPage]] does not exist" ); } @@ -159,9 +160,9 @@ class ApiWatchTest extends ApiTestCase { * @group Broken */ function testWatchDelete() { - + $data = $this->getTokens(); - + $keys = array_keys( $data[0]['query']['pages'] ); $key = array_pop( $keys ); $pageinfo = $data[0]['query']['pages'][$key];