Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PhptTestCase.php

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\Runner

Code

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;
}
RSS feed
Powered by Drupal