function PhptTestCase::parseEnvSection
1 call to PhptTestCase::parseEnvSection()
- PhptTestCase::run in vendor/
phpunit/ phpunit/ src/ Runner/ PhptTestCase.php - Runs a test and collects its result in a TestResult instance.
File
-
vendor/
phpunit/ phpunit/ src/ Runner/ PhptTestCase.php, line 355
Class
- PhptTestCase
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\RunnerCode
private function parseEnvSection(string $content) : array {
$env = [];
foreach (explode("\n", trim($content)) as $e) {
$e = explode('=', trim($e), 2);
if ($e[0] !== '' && isset($e[1])) {
$env[$e[0]] = $e[1];
}
}
return $env;
}