X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fphpunit%2Fincludes%2Futils%2FClassCollectorTest.php;h=9e5163f9ce4d2310950d4c96a377fa6dde1e7a61;hb=8624538de243da3779db5eb3362bedf78d2e2931;hp=e8a228e314a4edb766d4f2e1642c61d879d1699b;hpb=dae4c94d893057345f62a3d498fb85c0a54de5a6;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/utils/ClassCollectorTest.php b/tests/phpunit/includes/utils/ClassCollectorTest.php index e8a228e314..9e5163f9ce 100644 --- a/tests/phpunit/includes/utils/ClassCollectorTest.php +++ b/tests/phpunit/includes/utils/ClassCollectorTest.php @@ -3,7 +3,9 @@ /** * @covers ClassCollector */ -class ClassCollectorTest extends PHPUnit_Framework_TestCase { +class ClassCollectorTest extends PHPUnit\Framework\TestCase { + + use MediaWikiCoversValidator; public static function provideCases() { return [ @@ -31,6 +33,12 @@ class ClassCollectorTest extends PHPUnit_Framework_TestCase { "class_alias( Foo::class, 'Bar' );", [ 'Bar' ], ], + [ + // Namespaced class is not currently supported. Must use namespace declaration + // earlier in the file. + "class_alias( Example\Foo::class, 'Bar' );", + [], + ], [ "namespace Example;\nclass Foo {}\nclass_alias( Foo::class, 'Bar' );", [ 'Example\Foo', 'Bar' ],