Move DatabaseDomain to Rdbms namespace
[mediawiki.git] / tests / phpunit / includes / api / ApiStashEditTest.php
blobe2462c61388d24da3d2cefd8ccfbafe002532d3a
1 <?php
3 /**
4 * @covers ApiStashEdit
5 * @group API
6 * @group medium
7 * @group Database
8 */
9 class ApiStashEditTest extends ApiTestCase {
11 public function testBasicEdit() {
12 $this->doLogin();
13 $apiResult = $this->doApiRequestWithToken(
15 'action' => 'stashedit',
16 'title' => 'ApistashEdit_Page',
17 'contentmodel' => 'wikitext',
18 'contentformat' => 'text/x-wiki',
19 'text' => 'Text for ' . __METHOD__ . ' page',
20 'baserevid' => 0,
23 $apiResult = $apiResult[0];
24 $this->assertArrayHasKey( 'stashedit', $apiResult );
25 $this->assertEquals( 'stashed', $apiResult['stashedit']['status'] );