aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit')
-rw-r--r--tests/phpunit/includes/StatusTest.php22
-rw-r--r--tests/phpunit/includes/api/ApiTestCase.php8
-rw-r--r--tests/phpunit/includes/exception/MWExceptionHandlerTest.php4
-rw-r--r--tests/phpunit/includes/media/DjVuTest.php2
-rw-r--r--tests/phpunit/includes/specials/SpecialMyLanguageTest.php2
-rw-r--r--tests/phpunit/structure/ResourcesTest.php2
6 files changed, 20 insertions, 20 deletions
diff --git a/tests/phpunit/includes/StatusTest.php b/tests/phpunit/includes/StatusTest.php
index 9e2f5b8ae701..b2e44593be61 100644
--- a/tests/phpunit/includes/StatusTest.php
+++ b/tests/phpunit/includes/StatusTest.php
@@ -327,7 +327,7 @@ class StatusTest extends MediaWikiLangTestCase {
public static function provideGetWikiTextAndHtml() {
$testCases = array();
- $testCases[ 'GoodStatus' ] = array(
+ $testCases['GoodStatus'] = array(
new Status(),
"Internal error: Status::getWikiText called for a good result, this is incorrect\n",
"<p>Internal error: Status::getWikiText called for a good result, this is incorrect\n</p>",
@@ -335,7 +335,7 @@ class StatusTest extends MediaWikiLangTestCase {
$status = new Status();
$status->ok = false;
- $testCases[ 'GoodButNoError' ] = array(
+ $testCases['GoodButNoError'] = array(
$status,
"Internal error: Status::getWikiText: Invalid result object: no error text but not OK\n",
"<p>Internal error: Status::getWikiText: Invalid result object: no error text but not OK\n</p>",
@@ -343,7 +343,7 @@ class StatusTest extends MediaWikiLangTestCase {
$status = new Status();
$status->warning( 'fooBar!' );
- $testCases[ '1StringWarning' ] = array(
+ $testCases['1StringWarning'] = array(
$status,
"<fooBar!>",
"<p>&lt;fooBar!&gt;\n</p>",
@@ -352,7 +352,7 @@ class StatusTest extends MediaWikiLangTestCase {
$status = new Status();
$status->warning( 'fooBar!' );
$status->warning( 'fooBar2!' );
- $testCases[ '2StringWarnings' ] = array(
+ $testCases['2StringWarnings'] = array(
$status,
"* <fooBar!>\n* <fooBar2!>\n",
"<ul><li> &lt;fooBar!&gt;</li>\n<li> &lt;fooBar2!&gt;</li></ul>\n",
@@ -360,7 +360,7 @@ class StatusTest extends MediaWikiLangTestCase {
$status = new Status();
$status->warning( new Message( 'fooBar!', array( 'foo', 'bar' ) ) );
- $testCases[ '1MessageWarning' ] = array(
+ $testCases['1MessageWarning'] = array(
$status,
"<fooBar!>",
"<p>&lt;fooBar!&gt;\n</p>",
@@ -369,7 +369,7 @@ class StatusTest extends MediaWikiLangTestCase {
$status = new Status();
$status->warning( new Message( 'fooBar!', array( 'foo', 'bar' ) ) );
$status->warning( new Message( 'fooBar2!' ) );
- $testCases[ '2MessageWarnings' ] = array(
+ $testCases['2MessageWarnings'] = array(
$status,
"* <fooBar!>\n* <fooBar2!>\n",
"<ul><li> &lt;fooBar!&gt;</li>\n<li> &lt;fooBar2!&gt;</li></ul>\n",
@@ -399,7 +399,7 @@ class StatusTest extends MediaWikiLangTestCase {
public static function provideGetMessage() {
$testCases = array();
- $testCases[ 'GoodStatus' ] = array(
+ $testCases['GoodStatus'] = array(
new Status(),
array( "Status::getMessage called for a good result, this is incorrect\n" ),
'internalerror_info'
@@ -407,7 +407,7 @@ class StatusTest extends MediaWikiLangTestCase {
$status = new Status();
$status->ok = false;
- $testCases[ 'GoodButNoError' ] = array(
+ $testCases['GoodButNoError'] = array(
$status,
array( "Status::getMessage: Invalid result object: no error text but not OK\n" ),
'internalerror_info'
@@ -415,7 +415,7 @@ class StatusTest extends MediaWikiLangTestCase {
$status = new Status();
$status->warning( 'fooBar!' );
- $testCases[ '1StringWarning' ] = array(
+ $testCases['1StringWarning'] = array(
$status,
array(),
'fooBar!'
@@ -437,7 +437,7 @@ class StatusTest extends MediaWikiLangTestCase {
$status = new Status();
$status->warning( new Message( 'fooBar!', array( 'foo', 'bar' ) ) );
- $testCases[ '1MessageWarning' ] = array(
+ $testCases['1MessageWarning'] = array(
$status,
array( 'foo', 'bar' ),
'fooBar!'
@@ -446,7 +446,7 @@ class StatusTest extends MediaWikiLangTestCase {
$status = new Status();
$status->warning( new Message( 'fooBar!', array( 'foo', 'bar' ) ) );
$status->warning( new Message( 'fooBar2!' ) );
- $testCases[ '2MessageWarnings' ] = array(
+ $testCases['2MessageWarnings'] = array(
$status,
array( new Message( 'fooBar!', array( 'foo', 'bar' ) ), new Message( 'fooBar2!' ) ),
"* \$1\n* \$2"
diff --git a/tests/phpunit/includes/api/ApiTestCase.php b/tests/phpunit/includes/api/ApiTestCase.php
index 87ad2cdf57e2..0976b1a9bb51 100644
--- a/tests/phpunit/includes/api/ApiTestCase.php
+++ b/tests/phpunit/includes/api/ApiTestCase.php
@@ -152,8 +152,8 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
$data = $this->doApiRequest( array(
'action' => 'login',
- 'lgname' => self::$users[ $user ]->username,
- 'lgpassword' => self::$users[ $user ]->password ) );
+ 'lgname' => self::$users[$user]->username,
+ 'lgpassword' => self::$users[$user]->password ) );
$token = $data[0]['login']['token'];
@@ -161,8 +161,8 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
array(
'action' => 'login',
'lgtoken' => $token,
- 'lgname' => self::$users[ $user ]->username,
- 'lgpassword' => self::$users[ $user ]->password,
+ 'lgname' => self::$users[$user]->username,
+ 'lgpassword' => self::$users[$user]->password,
),
$data[2]
);
diff --git a/tests/phpunit/includes/exception/MWExceptionHandlerTest.php b/tests/phpunit/includes/exception/MWExceptionHandlerTest.php
index 2eb1c46e7a54..dc5dc6aa32c4 100644
--- a/tests/phpunit/includes/exception/MWExceptionHandlerTest.php
+++ b/tests/phpunit/includes/exception/MWExceptionHandlerTest.php
@@ -27,7 +27,7 @@ class MWExceptionHandlerTest extends MediaWikiTestCase {
$hasObject = false;
$hasArray = false;
foreach ( $trace as $frame ) {
- if ( ! isset( $frame['args'] ) ) {
+ if ( !isset( $frame['args'] ) ) {
continue;
}
foreach ( $frame['args'] as $arg ) {
@@ -49,7 +49,7 @@ class MWExceptionHandlerTest extends MediaWikiTestCase {
$redacted = MWExceptionHandler::getRedactedTrace( $e );
foreach ( $redacted as $frame ) {
- if ( ! isset( $frame['args'] ) ) {
+ if ( !isset( $frame['args'] ) ) {
continue;
}
foreach ( $frame['args'] as $arg ) {
diff --git a/tests/phpunit/includes/media/DjVuTest.php b/tests/phpunit/includes/media/DjVuTest.php
index d779207ec7f6..c0871f19fc39 100644
--- a/tests/phpunit/includes/media/DjVuTest.php
+++ b/tests/phpunit/includes/media/DjVuTest.php
@@ -62,7 +62,7 @@ class DjVuTest extends MediaWikiMediaTestCase {
$file = $this->dataFile( 'LoremIpsum.djvu', 'image/x.djvu' );
$this->assertEquals(
"Lorem ipsum \n1 \n",
- (string) $this->handler->getPageText( $file, 1 ),
+ (string)$this->handler->getPageText( $file, 1 ),
"Text layer of page 1 of file LoremIpsum.djvu should be 'Lorem ipsum \n1 \n'"
);
}
diff --git a/tests/phpunit/includes/specials/SpecialMyLanguageTest.php b/tests/phpunit/includes/specials/SpecialMyLanguageTest.php
index 020d4362168f..c09d68ccd03a 100644
--- a/tests/phpunit/includes/specials/SpecialMyLanguageTest.php
+++ b/tests/phpunit/includes/specials/SpecialMyLanguageTest.php
@@ -62,4 +62,4 @@ class SpecialMyLanguageTest extends MediaWikiTestCase {
array( 'Page/Another', 'Page/Another', 'en', 'es' ),
);
}
-} \ No newline at end of file
+}
diff --git a/tests/phpunit/structure/ResourcesTest.php b/tests/phpunit/structure/ResourcesTest.php
index d7742a697688..55b2b6b4ea23 100644
--- a/tests/phpunit/structure/ResourcesTest.php
+++ b/tests/phpunit/structure/ResourcesTest.php
@@ -115,7 +115,7 @@ class ResourcesTest extends MediaWikiTestCase {
$media,
$file,
// XXX: Wrapped in an object to keep it out of PHPUnit output
- (object) array( 'cssText' => $readStyleFile->invoke( $module, $file, $flip ) ),
+ (object)array( 'cssText' => $readStyleFile->invoke( $module, $file, $flip ) ),
);
}
}