function PhptTestCase::validate
1 call to PhptTestCase::validate()
- PhptTestCase::parse in vendor/
phpunit/ phpunit/ src/ Runner/ PhptTestCase.php
File
-
vendor/
phpunit/ phpunit/ src/ Runner/ PhptTestCase.php, line 534
Class
- PhptTestCase
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\RunnerCode
private function validate(array $sections) : bool {
$requiredSections = [
'FILE',
[
'EXPECT',
'EXPECTF',
'EXPECTREGEX',
],
];
foreach ($requiredSections as $section) {
if (is_array($section)) {
$foundSection = false;
foreach ($section as $anySection) {
if (isset($sections[$anySection])) {
$foundSection = true;
break;
}
}
if (!$foundSection) {
return false;
}
continue;
}
if (!isset($sections[$section])) {
return false;
}
}
return true;
}