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'); } }
/** * @test */ public function shouldNotStoreEmptyUrlForNotices() { //given Config::overridePropertyArray(array('global', 'prefix_system'), 'prefix'); $_SESSION = array(); $controller = Controller::createInstance(new RouteRule('', '', '', '', false)); //when $controller->notice('hello'); //then Assert::thatArray(Session::get('messages'))->containsOnly(new Notice('hello', null)); Config::revertPropertyArray(array('global', 'prefix_system')); }
public function with($value) { Config::overridePropertyArray($this->keys, $value); }