public function __construct($config) { parent::__construct('test', true); $fs = new Filesystem(); if (!$fs->isAbsolutePath($config)) { $config = __DIR__ . '/config/' . $config; } if (!file_exists($config)) { throw new \RuntimeException(sprintf('The config file "%s" does not exist.', $config)); } $this->config = $config; }
public function __construct($testCase, $rootConfig, $environment, $debug) { if (!is_dir(__DIR__ . '/' . $testCase)) { throw new \InvalidArgumentException(sprintf('The test case "%s" does not exist.', $testCase)); } $this->testCase = $testCase; $fs = new Filesystem(); if (!$fs->isAbsolutePath($rootConfig) && !file_exists($rootConfig = __DIR__ . '/' . $testCase . '/' . $rootConfig)) { throw new \InvalidArgumentException(sprintf('The root config "%s" does not exist.', $rootConfig)); } $this->rootConfig = $rootConfig; parent::__construct($environment, $debug); }