MediaWiki REL1_31
ApiStashEditTest.php
Go to the documentation of this file.
1<?php
2
10
11 public function testBasicEdit() {
12 $apiResult = $this->doApiRequestWithToken(
13 [
14 'action' => 'stashedit',
15 'title' => 'ApistashEdit_Page',
16 'contentmodel' => 'wikitext',
17 'contentformat' => 'text/x-wiki',
18 'text' => 'Text for ' . __METHOD__ . ' page',
19 'baserevid' => 0,
20 ]
21 );
22 $apiResult = $apiResult[0];
23 $this->assertArrayHasKey( 'stashedit', $apiResult );
24 $this->assertEquals( 'stashed', $apiResult['stashedit']['status'] );
25 }
26
27}
ApiStashEdit API medium Database.
doApiRequestWithToken(array $params, array $session=null, User $user=null, $tokenType='auto')
Convenience function to access the token parameter of doApiRequest() more succinctly.