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
Update declaration of UploadFromUrlTest::doApiRequest
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
upload
/
UploadFromUrlTest.php
diff --git
a/tests/phpunit/includes/upload/UploadFromUrlTest.php
b/tests/phpunit/includes/upload/UploadFromUrlTest.php
index
6d17a68
..
a69a137
100644
(file)
--- a/
tests/phpunit/includes/upload/UploadFromUrlTest.php
+++ b/
tests/phpunit/includes/upload/UploadFromUrlTest.php
@@
-22,7
+22,7
@@
class UploadFromUrlTest extends ApiTestCase {
}
protected function doApiRequest( array $params, array $unused = null,
}
protected function doApiRequest( array $params, array $unused = null,
- $appendModule = false, User $user = null
+ $appendModule = false, User $user = null
, $tokenType = null
) {
global $wgRequest;
) {
global $wgRequest;
@@
-58,7
+58,7
@@
class UploadFromUrlTest extends ApiTestCase {
$this->doApiRequest( [
'action' => 'upload',
] );
$this->doApiRequest( [
'action' => 'upload',
] );
- } catch ( UsageException $e ) {
+ } catch (
Api
UsageException $e ) {
$exception = true;
$this->assertEquals( "The token parameter must be set", $e->getMessage() );
}
$exception = true;
$this->assertEquals( "The token parameter must be set", $e->getMessage() );
}
@@
-70,7
+70,7
@@
class UploadFromUrlTest extends ApiTestCase {
'action' => 'upload',
'token' => $token,
], $data );
'action' => 'upload',
'token' => $token,
], $data );
- } catch ( UsageException $e ) {
+ } catch (
Api
UsageException $e ) {
$exception = true;
$this->assertEquals( "One of the parameters sessionkey, file, url is required",
$e->getMessage() );
$exception = true;
$this->assertEquals( "One of the parameters sessionkey, file, url is required",
$e->getMessage() );
@@
-84,7
+84,7
@@
class UploadFromUrlTest extends ApiTestCase {
'url' => 'http://www.example.com/test.png',
'token' => $token,
], $data );
'url' => 'http://www.example.com/test.png',
'token' => $token,
], $data );
- } catch ( UsageException $e ) {
+ } catch (
Api
UsageException $e ) {
$exception = true;
$this->assertEquals( "The filename parameter must be set", $e->getMessage() );
}
$exception = true;
$this->assertEquals( "The filename parameter must be set", $e->getMessage() );
}
@@
-99,7
+99,7
@@
class UploadFromUrlTest extends ApiTestCase {
'filename' => 'UploadFromUrlTest.png',
'token' => $token,
], $data );
'filename' => 'UploadFromUrlTest.png',
'token' => $token,
], $data );
- } catch ( UsageException $e ) {
+ } catch (
Api
UsageException $e ) {
$exception = true;
$this->assertEquals( "Permission denied", $e->getMessage() );
}
$exception = true;
$this->assertEquals( "Permission denied", $e->getMessage() );
}