From: Antoine Musso Date: Thu, 16 Jun 2016 20:25:58 +0000 (+0200) Subject: test: basic test for ApiStashEdit X-Git-Tag: 1.31.0-rc.0~6588 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=6fe1e2e24827f5fbe0c44a46ab8d5ed891985813;p=lhc%2Fweb%2Fwiklou.git test: basic test for ApiStashEdit At least execute the main entry point. Change-Id: I0788c9a7bf93b5365f4e510dff4e11fe6ffa3558 --- diff --git a/tests/phpunit/includes/api/ApiStashEditTest.php b/tests/phpunit/includes/api/ApiStashEditTest.php new file mode 100644 index 0000000000..e2462c6138 --- /dev/null +++ b/tests/phpunit/includes/api/ApiStashEditTest.php @@ -0,0 +1,28 @@ +doLogin(); + $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'] ); + } + +}