aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/api/ApiOptionsTest.php
diff options
context:
space:
mode:
authorUmherirrender <umherirrender_de.wp@web.de>2024-09-01 14:37:01 +0200
committerUmherirrender <umherirrender_de.wp@web.de>2024-09-01 23:24:11 +0200
commit0a69e0bc53a44057996d48e63b7f56efd229f00d (patch)
tree53cc5234d22707c1efc8a56ee0a287503bfbcac4 /tests/phpunit/includes/api/ApiOptionsTest.php
parenta6c216ad8d3be6120bb265e10647fc5d419af231 (diff)
downloadmediawikicore-0a69e0bc53a44057996d48e63b7f56efd229f00d.tar.gz
mediawikicore-0a69e0bc53a44057996d48e63b7f56efd229f00d.zip
tests: Use const for some static data in test files
Change-Id: Id7ccd48e3bf626095e2d3929831b5d87ed0be948
Diffstat (limited to 'tests/phpunit/includes/api/ApiOptionsTest.php')
-rw-r--r--tests/phpunit/includes/api/ApiOptionsTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/phpunit/includes/api/ApiOptionsTest.php b/tests/phpunit/includes/api/ApiOptionsTest.php
index d40aa066a949..2c0636eaedd4 100644
--- a/tests/phpunit/includes/api/ApiOptionsTest.php
+++ b/tests/phpunit/includes/api/ApiOptionsTest.php
@@ -38,7 +38,7 @@ class ApiOptionsTest extends ApiTestCase {
/** @var DerivativeContext */
private $mContext;
- private static $Success = [ 'options' => 'success' ];
+ private const SUCCESS = [ 'options' => 'success' ];
protected function setUp(): void {
parent::setUp();
@@ -283,7 +283,7 @@ class ApiOptionsTest extends ApiTestCase {
if ( $expectException ) {
$this->fail( 'Expected a "notloggedin" error.' );
} else {
- $this->assertEquals( self::$Success, $response );
+ $this->assertEquals( self::SUCCESS, $response );
}
} catch ( ApiUsageException $e ) {
if ( !$expectException ) {
@@ -315,7 +315,7 @@ class ApiOptionsTest extends ApiTestCase {
if ( $expectException ) {
$this->fail( "Expected an ApiUsageException" );
} else {
- $this->assertEquals( self::$Success, $response );
+ $this->assertEquals( self::SUCCESS, $response );
}
} catch ( ApiUsageException $e ) {
if ( !$expectException ) {
@@ -367,7 +367,7 @@ class ApiOptionsTest extends ApiTestCase {
if ( $expectException ) {
$this->fail( "Expected an ApiUsageException" );
} else {
- $this->assertEquals( self::$Success, $response );
+ $this->assertEquals( self::SUCCESS, $response );
}
} catch ( ApiUsageException $e ) {
if ( !$expectException ) {
@@ -414,7 +414,7 @@ class ApiOptionsTest extends ApiTestCase {
$response = $this->executeQuery( $request );
if ( !$result ) {
- $result = self::$Success;
+ $result = self::SUCCESS;
}
$this->assertEquals( $result, $response, $message );
}