diff options
Diffstat (limited to 'www/wiki/tests/phpunit/includes/api/ApiStashEditTest.php')
-rw-r--r-- | www/wiki/tests/phpunit/includes/api/ApiStashEditTest.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/www/wiki/tests/phpunit/includes/api/ApiStashEditTest.php b/www/wiki/tests/phpunit/includes/api/ApiStashEditTest.php new file mode 100644 index 00000000..60cda090 --- /dev/null +++ b/www/wiki/tests/phpunit/includes/api/ApiStashEditTest.php @@ -0,0 +1,27 @@ +<?php + +/** + * @covers ApiStashEdit + * @group API + * @group medium + * @group Database + */ +class ApiStashEditTest extends ApiTestCase { + + public function testBasicEdit() { + $apiResult = $this->doApiRequestWithToken( + [ + 'action' => 'stashedit', + 'title' => 'ApistashEdit_Page', + 'contentmodel' => 'wikitext', + 'contentformat' => 'text/x-wiki', + 'text' => 'Text for ' . __METHOD__ . ' page', + 'baserevid' => 0, + ] + ); + $apiResult = $apiResult[0]; + $this->assertArrayHasKey( 'stashedit', $apiResult ); + $this->assertEquals( 'stashed', $apiResult['stashedit']['status'] ); + } + +} |