Refactor ApiTestCase to get token from ApiQueryTokens
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiBaseTest.php
index ee0ad94..3f6cac9 100644 (file)
@@ -51,6 +51,7 @@ class ApiBaseTest extends ApiTestCase {
         * @param array $paramSettings
         * @param mixed $expected
         * @param string[] $warnings
+        * @covers ApiBase::getParameterFromSettings
         */
        public function testGetParameterFromSettings( $input, $paramSettings, $expected, $warnings ) {
                $mock = new MockApi();
@@ -126,6 +127,9 @@ class ApiBaseTest extends ApiTestCase {
                ];
        }
 
+       /**
+        * @covers ApiBase::errorArrayToStatus
+        */
        public function testErrorArrayToStatus() {
                $mock = new MockApi();
 
@@ -153,6 +157,7 @@ class ApiBaseTest extends ApiTestCase {
                $block = new \Block( [
                        'address' => $user->getName(),
                        'user' => $user->getID(),
+                       'by' => $this->getTestSysop()->getUser()->getId(),
                        'reason' => __METHOD__,
                        'expiry' => time() + 100500,
                ] );