<?php
/**
+ * @group API
* @group Database
- * @todo This test suite is severly broken and need a full review
+ * @todo This test suite is severly broken and need a full review
*/
class ApiWatchTest extends ApiTestCase {
parent::setUp();
$this->doLogin();
}
-
+
function getTokens() {
return $this->getTokenList( self::$users['sysop'] );
}
* @group Broken
*/
function testWatchEdit() {
-
+
$data = $this->getTokens();
-
+
$keys = array_keys( $data[0]['query']['pages'] );
$key = array_pop( $keys );
$pageinfo = $data[0]['query']['pages'][$key];
* @group Broken
*/
function testWatchClear() {
-
+
$data = $this->doApiRequest( array(
'action' => 'query',
'list' => 'watchlist' ), $data );
/**
* @group Broken
- */
+ */
function testWatchProtect() {
-
+
$data = $this->getTokens();
-
+
$keys = array_keys( $data[0]['query']['pages'] );
$key = array_pop( $keys );
$pageinfo = $data[0]['query']['pages'][$key];
* @group Broken
*/
function testGetRollbackToken() {
-
+
$data = $this->getTokens();
-
+
if ( !Title::newFromText( 'UTPage' )->exists() ) {
$this->markTestIncomplete( "The article [[UTPage]] does not exist" );
}
* @group Broken
*/
function testWatchDelete() {
-
+
$data = $this->getTokens();
-
+
$keys = array_keys( $data[0]['query']['pages'] );
$key = array_pop( $keys );
$pageinfo = $data[0]['query']['pages'][$key];