21 'title' =>
'Help:UTPage',
23 'token' =>
$tokens[
'edittoken'],
24 'watchlist' =>
'watch' ] );
41 'list' =>
'watchlist' ] );
43 if (
isset(
$data[0][
'query'][
'watchlist'] ) ) {
44 $wl =
$data[0][
'query'][
'watchlist'];
46 foreach ( $wl as $page ) {
49 'title' => $page[
'title'],
51 'token' =>
$tokens[
'watchtoken'] ] );
56 'list' =>
'watchlist' ],
$data );
59 foreach (
$data[0][
'query'][
'watchlist'] as $index => $item ) {
63 if (
strpos( $item[
'title'],
':' ) === 0 ) {
64 unset(
$data[0][
'query'][
'watchlist'][$index] );
76 'action' =>
'protect',
77 'token' =>
$tokens[
'protecttoken'],
78 'title' =>
'Help:UTPage',
79 'protections' =>
'edit=sysop',
80 'watchlist' =>
'unwatch' ] );
91 if ( !Title::newFromText(
'Help:UTPage' )->exists() ) {
97 'prop' =>
'revisions',
98 'titles' =>
'Help:UTPage',
99 'rvtoken' =>
'rollback' ] );
106 if (
isset(
$data[0][
'query'][
'pages'][$key][
'missing'] ) ) {
127 $pageinfo =
$data[0][
'query'][
'pages'][$key];
128 $revinfo = $pageinfo[
'revisions'][0];
132 'action' =>
'rollback',
133 'title' =>
'Help:UTPage',
134 'user' => $revinfo[
'user'],
135 'token' => $pageinfo[
'rollbacktoken'],
136 'watchlist' =>
'watch' ] );
141 if ( self::apiExceptionHasCode( $ue,
'onlyauthor' ) ) {
142 $this->
markTestIncomplete(
"Only one author to 'Help:UTPage', cannot test rollback" );
144 $this->fail(
"Received error '" . $ue->getMessage() .
"'" );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
getTokenList(TestUser $user, $session=null)
doApiRequest(array $params, array $session=null, $appendModule=false, User $user=null, $tokenType=null)
Does the API request and returns the result.
Exception used to abort API execution with an error.
testWatchRollback( $data)
Broken Broken because there is currently no revision info in the $pageinfo.
testWatchClear()
@depends testWatchEdit
$data
Utility to generate mapping file used in mw.Title (phpCharToUpper.json)