| 1 |
<?php |
| 2 |
|
| 3 |
declare( strict_types = 1 ); |
| 4 |
|
| 5 |
namespace MediaWiki\Tests\Unit\composer\PhpUnitSplitter; |
| 6 |
|
| 7 |
use MediaWiki\Composer\PhpUnitSplitter\PhpUnitTestListProcessor; |
| 8 |
use PHPUnit\Framework\TestCase; |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
class PhpUnitTestListProcessorTest extends TestCase { |
| 15 |
|
| 16 |
private const FIXTURE_FILE = __DIR__ . "/fixtures/tests-list.xml"; |
| 17 |
|
| 18 |
public function testGetTestClasses() { |
| 19 |
$testList = new PhpUnitTestListProcessor( self::FIXTURE_FILE ); |
| 20 |
$this->assertCount( |
| 21 |
5, $testList->getTestClasses(), "Expected classes to be loaded" |
| 22 |
); |
| 23 |
$test5 = $testList->getTestClasses()[4]; |
| 24 |
$this->assertEquals( |
| 25 |
[ [ 'MediaWiki', 'Tests', 'Unit', 'composer', 'PhpUnitSplitter' ], 'TestSuiteBuilderTest' ], |
| 26 |
[ $test5->getNamespace(), $test5->getClassName() ] |
| 27 |
); |
| 28 |
} |
| 29 |
} |