protected function setUp() { $tmp_dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR; $tmp_cache_path = $tmp_dir . 'testing_cache_' . mt_rand() . DIRECTORY_SEPARATOR; $tmp_deploy_path = $tmp_dir . 'testing_deploy_' . mt_rand() . DIRECTORY_SEPARATOR; $this->config = Config\Config::create(array('cache_dir' => $tmp_cache_path, 'deploy_dir' => $tmp_deploy_path, 'plugin_settings' => array())); $this->schema_path = __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'simple_schema_with_aggregate.xml'; }
protected function createConfig(Input\InputInterface $input) { $config_path = $input->getOption('config'); if (empty($config_path)) { $config_path = $this->getLookupDir($input) . DIRECTORY_SEPARATOR . 'dat0r.ini'; } $config_reader = Config\IniFileConfigReader::create(); $settings = $config_reader->read($config_path); $this->service_config = Config\Config::create($settings); return $this->service_config; }
/** * @expectedException Dat0r\CodeGen\Config\Exception */ public function testCreateWithInvalidDeployMethod() { Config\Config::create(array('deploy_method' => 'invalid_deploy_method', 'cache_dir' => self::FIX_CACHE_DIR, 'deploy_dir' => self::FIX_DEPLOY_DIR)); // @codeCoverageIgnoreStart }