Skip to content

Commit d3f2303

Browse files
committed
GetClassPropertiesTest: update for more recent PHPUnit version
1 parent 06d4bb6 commit d3f2303

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/Core/File/GetClassPropertiesTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
namespace PHP_CodeSniffer\Tests\Core\File;
1111

12+
use PHP_CodeSniffer\Exceptions\RuntimeException;
1213
use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest;
1314

1415
class GetClassPropertiesTest extends AbstractMethodUnitTest
@@ -23,13 +24,13 @@ class GetClassPropertiesTest extends AbstractMethodUnitTest
2324
*
2425
* @dataProvider dataNotAClassException
2526
*
26-
* @expectedException PHP_CodeSniffer\Exceptions\RuntimeException
27-
* @expectedExceptionMessage $stackPtr must be of type T_CLASS
28-
*
2927
* @return void
3028
*/
3129
public function testNotAClassException($testMarker, $tokenType)
3230
{
31+
$this->expectException(RuntimeException::class);
32+
$this->expectExceptionMessage('$stackPtr must be of type T_CLASS');
33+
3334
$target = $this->getTargetToken($testMarker, $tokenType);
3435
self::$phpcsFile->getClassProperties($target);
3536

0 commit comments

Comments
 (0)