public function PhpUnitTestRunnerTest::testSummarizeResults in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php \Drupal\Tests\Core\Test\PhpUnitTestRunnerTest::testSummarizeResults()
- 9 core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php \Drupal\Tests\Core\Test\PhpUnitTestRunnerTest::testSummarizeResults()
@dataProvider providerTestSummarizeResults @covers ::summarizeResults
File
- core/
tests/ Drupal/ Tests/ Core/ Test/ PhpUnitTestRunnerTest.php, line 130
Class
- PhpUnitTestRunnerTest
- @coversDefaultClass \Drupal\Core\Test\PhpUnitTestRunner @group Test
Namespace
Drupal\Tests\Core\TestCode
public function testSummarizeResults($results, $has_status) {
$runner = new PhpUnitTestRunner($this->root, sys_get_temp_dir());
$summary = $runner
->summarizeResults($results);
$this
->assertArrayHasKey(static::class, $summary);
$this
->assertEquals(1, $summary[static::class][$has_status]);
foreach (array_diff([
'#pass',
'#fail',
'#exception',
'#debug',
], [
$has_status,
]) as $should_be_zero) {
$this
->assertSame(0, $summary[static::class][$should_be_zero]);
}
}