From: Lucas Werkmeister Date: Mon, 26 Feb 2018 17:04:33 +0000 (+0100) Subject: Accept non-fully qualified TestCase in StructureTest X-Git-Tag: 1.31.0-rc.0~502^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=4a1e59b63db0af00cf6fefde30f49120c6ff71b8;p=lhc%2Fweb%2Fwiklou.git Accept non-fully qualified TestCase in StructureTest This makes StructureTest also recognize test classes which look like use PHPUnit\Framework\TestCase; class FooTest extends TestCase { instead of class FooTest extends \PHPUnit\Framework\TestCase { This form is preferred, for instance, in Wikibase code. Bug: T188276 Change-Id: I5bef035df33d317893ad3ba195ecb75f3b09a62f --- diff --git a/tests/phpunit/structure/StructureTest.php b/tests/phpunit/structure/StructureTest.php index 35434634cf..4df791ecd8 100644 --- a/tests/phpunit/structure/StructureTest.php +++ b/tests/phpunit/structure/StructureTest.php @@ -26,6 +26,7 @@ class StructureTest extends MediaWikiTestCase { 'ResourceLoaderTestCase', 'PHPUnit_Framework_TestCase', '\\?PHPUnit\\Framework\\TestCase', + 'TestCase', // \PHPUnit\Framework\TestCase with appropriate use statement 'DumpTestCase', ] ); $testClassRegex = "^class .* extends ($testClassRegex)";