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
Merge "Fix and make some types in PHPDoc and JSDoc tags more specific"
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
api
/
ApiMainTest.php
diff --git
a/tests/phpunit/includes/api/ApiMainTest.php
b/tests/phpunit/includes/api/ApiMainTest.php
index
ea33a9e
..
ad334e9
100644
(file)
--- a/
tests/phpunit/includes/api/ApiMainTest.php
+++ b/
tests/phpunit/includes/api/ApiMainTest.php
@@
-500,6
+500,10
@@
class ApiMainTest extends ApiTestCase {
MWExceptionHandler::getRedactedTraceAsString( $dbex )
)->inLanguage( 'en' )->useDatabase( false )->text();
MWExceptionHandler::getRedactedTraceAsString( $dbex )
)->inLanguage( 'en' )->useDatabase( false )->text();
+ MediaWiki\suppressWarnings();
+ $usageEx = new UsageException( 'Usage exception!', 'ue', 0, [ 'foo' => 'bar' ] );
+ MediaWiki\restoreWarnings();
+
$apiEx1 = new ApiUsageException( null,
StatusValue::newFatal( new ApiRawMessage( 'An error', 'sv-error1' ) ) );
TestingAccessWrapper::newFromObject( $apiEx1 )->modulePath = 'foo+bar';
$apiEx1 = new ApiUsageException( null,
StatusValue::newFatal( new ApiRawMessage( 'An error', 'sv-error1' ) ) );
TestingAccessWrapper::newFromObject( $apiEx1 )->modulePath = 'foo+bar';
@@
-545,7
+549,7
@@
class ApiMainTest extends ApiTestCase {
]
],
[
]
],
[
-
new UsageException( 'Usage exception!', 'ue', 0, [ 'foo' => 'bar' ] )
,
+
$usageEx
,
[ 'existing-error', 'ue' ],
[
'warnings' => [
[ 'existing-error', 'ue' ],
[
'warnings' => [