コード例 #1
0
ファイル: test.php プロジェクト: photon/photon
 public function setup()
 {
     $this->conf = Conf::dump();
     if (isset($_ENV['photon.config'])) {
         Conf::load(include $_ENV['photon.config']);
     }
 }
コード例 #2
0
ファイル: middlewareTest.php プロジェクト: photon/photon
 public function setUp()
 {
     $this->conf = Conf::dump();
     // Dummy view to test the middleware
     Conf::set('urls', array(array('regex' => '#^/$#', 'view' => array(__NAMESPACE__ . '\\DummyViews', 'simple'))));
     // Register the middleware to be tested
     Conf::set('middleware_classes', array('\\photon\\middleware\\Security'));
 }
コード例 #3
0
ファイル: configTest.php プロジェクト: photon/photon
 public function testDumpLoad()
 {
     $this->assertequals(true, Conf::f('debug'));
     $conf = Conf::dump();
     $new_conf = array('debug' => false);
     Conf::load($new_conf);
     $this->assertequals(false, Conf::f('debug'));
     Conf::load($conf);
     $this->assertequals(true, Conf::f('debug'));
 }
コード例 #4
0
ファイル: coreurlTest.php プロジェクト: photon/photon
 public function setUp()
 {
     $this->conf = Conf::dump();
 }
コード例 #5
0
ファイル: manager.php プロジェクト: photon/photon
 public function run()
 {
     $this->loadConfig();
     $conf = Conf::dump();
     unset($conf['cmd_params']);
     var_export($conf);
 }
コード例 #6
0
ファイル: logTest.php プロジェクト: photon/photon
 public function setUp()
 {
     $this->conf = Conf::dump();
     $this->level = Log::$level;
 }