aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/DeprecatedGlobalTest.php
diff options
context:
space:
mode:
authorUmherirrender <umherirrender_de.wp@web.de>2021-01-02 21:32:36 +0100
committerUmherirrender <umherirrender_de.wp@web.de>2021-01-04 00:16:51 +0000
commit3aade9e40ab35a2ac269dfc582955941b6673959 (patch)
treede4f49f10b5a781d631a7d6cded382f6c796b50b /tests/phpunit/includes/DeprecatedGlobalTest.php
parent835802f9136932d6dcb5a54c9439f186509a5555 (diff)
downloadmediawikicore-3aade9e40ab35a2ac269dfc582955941b6673959.tar.gz
mediawikicore-3aade9e40ab35a2ac269dfc582955941b6673959.zip
Use expectWarning/Deprecation/Notice/Error() in phpunit tests
It is deprecated in newer phpunit versions Bug: T271049 Change-Id: I3b2105cbd582ecc57ab8bc1bb1617300f15682ad
Diffstat (limited to 'tests/phpunit/includes/DeprecatedGlobalTest.php')
-rw-r--r--tests/phpunit/includes/DeprecatedGlobalTest.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/phpunit/includes/DeprecatedGlobalTest.php b/tests/phpunit/includes/DeprecatedGlobalTest.php
index 7cff95452246..5f2cbcd1c05f 100644
--- a/tests/phpunit/includes/DeprecatedGlobalTest.php
+++ b/tests/phpunit/includes/DeprecatedGlobalTest.php
@@ -18,8 +18,6 @@
* @file
*/
-use PHPUnit\Framework\Error\Deprecated;
-
/**
* @covers DeprecatedGlobal
*/
@@ -73,8 +71,8 @@ class DeprecatedGlobalTest extends MediaWikiIntegrationTestCase {
global $wgDummy1;
$wgDummy1 = new DeprecatedGlobal( 'wgDummy1', new HashBagOStuff(), '1.30' );
- $this->expectException( Deprecated::class );
- $this->expectExceptionMessage( 'Use of $wgDummy1 was deprecated in MediaWiki 1.30' );
+ $this->expectDeprecation();
+ $this->expectDeprecationMessage( 'Use of $wgDummy1 was deprecated in MediaWiki 1.30' );
$wgDummy1->get( 'foo' );
$this->assertInstanceOf( HashBagOStuff::class, $wgDummy1 );
}