예제 #1
0
 public function testConstruct()
 {
     $app = $this->getMockBuilder('Hyperframework\\Web\\App')->disableOriginalConstructor()->getMock();
     Config::remove('hyperframework.app_root_path');
     $app->__construct(dirname(__DIR__));
     $this->assertNotNull(Config::get('hyperframework.app_root_path'));
 }
예제 #2
0
 public function testGet()
 {
     $this->mockEngineMethod('get')->with('name', 'default')->willReturn(true);
     $this->assertTrue(Config::get('name', 'default'));
 }
예제 #3
0
 public function testInitializeConfigWithoutEnvConfigFile()
 {
     Config::set('hyperframework.initialize_error_handler', false);
     $app = new App(dirname(__DIR__));
     $this->assertSame('value', Config::get('key'));
 }