diff options
author | Umherirrender <umherirrender_de.wp@web.de> | 2021-01-02 21:32:36 +0100 |
---|---|---|
committer | Umherirrender <umherirrender_de.wp@web.de> | 2021-01-04 00:16:51 +0000 |
commit | 3aade9e40ab35a2ac269dfc582955941b6673959 (patch) | |
tree | de4f49f10b5a781d631a7d6cded382f6c796b50b /tests/phpunit/includes/DeprecatedGlobalTest.php | |
parent | 835802f9136932d6dcb5a54c9439f186509a5555 (diff) | |
download | mediawikicore-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.php | 6 |
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 ); } |