dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor ApiTestCase to get token from ApiQueryTokens
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
api
/
ApiBaseTest.php
diff --git
a/tests/phpunit/includes/api/ApiBaseTest.php
b/tests/phpunit/includes/api/ApiBaseTest.php
index
ee0ad94
..
3f6cac9
100644
(file)
--- a/
tests/phpunit/includes/api/ApiBaseTest.php
+++ b/
tests/phpunit/includes/api/ApiBaseTest.php
@@
-51,6
+51,7
@@
class ApiBaseTest extends ApiTestCase {
* @param array $paramSettings
* @param mixed $expected
* @param string[] $warnings
* @param array $paramSettings
* @param mixed $expected
* @param string[] $warnings
+ * @covers ApiBase::getParameterFromSettings
*/
public function testGetParameterFromSettings( $input, $paramSettings, $expected, $warnings ) {
$mock = new MockApi();
*/
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();
public function testErrorArrayToStatus() {
$mock = new MockApi();
@@
-153,6
+157,7
@@
class ApiBaseTest extends ApiTestCase {
$block = new \Block( [
'address' => $user->getName(),
'user' => $user->getID(),
$block = new \Block( [
'address' => $user->getName(),
'user' => $user->getID(),
+ 'by' => $this->getTestSysop()->getUser()->getId(),
'reason' => __METHOD__,
'expiry' => time() + 100500,
] );
'reason' => __METHOD__,
'expiry' => time() + 100500,
] );