public function setDir($dir) { if (!is_dir($dir)) { throw new Exception('Directory does not exist: ' . $dir); } $this->config['dir'] = rtrim($dir, '/\\') . DIRECTORY_SEPARATOR; }
/** * @expectedException Flintstone\Exception */ public function testConfigInvalidDir() { $config = new Config(); $config->setDir('/x/y/z/foo'); }