function PhpUnitTestRunnerTest::testSummarizeResults
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php \Drupal\Tests\Core\Test\PhpUnitTestRunnerTest::testSummarizeResults()
- 8.9.x core/tests/Drupal/Tests/Core/Test/PhpUnitTestRunnerTest.php \Drupal\Tests\Core\Test\PhpUnitTestRunnerTest::testSummarizeResults()
- 10 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 147
Class
- PhpUnitTestRunnerTest
- @coversDefaultClass \Drupal\Core\Test\PhpUnitTestRunner @group Test
Namespace
Drupal\Tests\Core\TestCode
public function testSummarizeResults($results, $has_status) : void {
$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]);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.