function __setupApp() { $config = new Config(); $config->setProtected('basePath', BASE_PATH); setCommonConfig($config); setUniqueConfig($config); return new \App\Application($config); }
protected function setUp() { $config = new Config(); $config->setProtected('basePath', BASE_PATH); setCommonConfig($config); setUniqueConfig($config); Application::setupRedBean('sqlite:test.db', 'user', 'password', $this->frozen, 'sqlite'); R::freeze(false); R::nuke(); R::freeze($this->frozen); $this->app = __setupApp(); /** $http Mock Http object. */ $http = $this->getMock('Skully\\Core\\Http'); $http->expects($this->any())->method('redirect')->will($this->returnCallback('stubRedirect')); $this->app->setHttp($http); }
public function testSetProtected() { $config = new Config(); $config->setProtected('test', 'value'); $this->assertEquals('value', $config->get('test')); }