protected function tearDown() { if (Files::exists($this->controllerPath)) { Files::delete($this->controllerPath); } parent::tearDown(); }
protected function tearDown() { Config::revertProperty("global", "prefix_system"); if (Files::exists($this->path)) { unlink($this->path); } parent::tearDown(); }
public function getControllerContents() { $controllerPath = $this->getControllerPath(); if (Files::exists($controllerPath)) { return file_get_contents($controllerPath); } return ''; }
public static function tearDownAfterClass() { Config::overrideProperty('debug')->with(true); Config::overrideProperty('language')->with('en'); Config::overridePropertyArray(array('global', 'prefix_system'), ''); if (Files::exists('/tmp/SampleConfigFile.php')) { unlink('/tmp/SampleConfigFile.php'); } }
public static function loadLabels() { if (!self::$_labels) { $language = self::getLanguage(); $path = Path::join(ROOT_PATH, 'locales', $language . '.php'); if (!Files::exists($path)) { throw new Exception('Cannot find declared language file: ' . $language); } /** @noinspection PhpIncludeInspection */ self::$_labels = (require $path); } return self::$_labels; }
public function isActionExists($actionFile) { return Files::exists(Path::join($this->getViewPath(), $actionFile)); }
private function verifyExists($viewPath, $viewName) { if (!Files::exists($viewPath)) { throw new ViewException('No view found [' . $viewName . '] at: ' . $viewPath); } }