MediaWiki
REL1_31
ApiStashEditTest.php
Go to the documentation of this file.
1
<?php
2
9
class
ApiStashEditTest
extends
ApiTestCase
{
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
}
ApiStashEditTest
ApiStashEdit API medium Database.
Definition
ApiStashEditTest.php:9
ApiStashEditTest\testBasicEdit
testBasicEdit()
Definition
ApiStashEditTest.php:11
ApiTestCase
Definition
ApiTestCase.php:5
ApiTestCase\doApiRequestWithToken
doApiRequestWithToken(array $params, array $session=null, User $user=null, $tokenType='auto')
Convenience function to access the token parameter of doApiRequest() more succinctly.
Definition
ApiTestCase.php:170
tests
phpunit
includes
api
ApiStashEditTest.php
Generated on Mon Nov 25 2024 15:36:14 for MediaWiki by
1.10.0