You are here

private static function TestCase::getConfig in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/driver-testsuite/tests/TestCase.php \Behat\Mink\Tests\Driver\TestCase::getConfig()

Return value

AbstractConfig

Throws

\UnexpectedValueException if the global driver_config_factory returns an invalid object

File

vendor/behat/mink/driver-testsuite/tests/TestCase.php, line 40

Class

TestCase

Namespace

Behat\Mink\Tests\Driver

Code

private static function getConfig() {
  if (null === self::$config) {
    self::$config = call_user_func($GLOBALS['driver_config_factory']);
    if (!self::$config instanceof AbstractConfig) {
      throw new \UnexpectedValueException('The "driver_config_factory" global variable must return a \\Behat\\Mink\\Tests\\Driver\\AbstractConfig.');
    }
  }
  return self::$config;
}