示例#1
0
文件: AppTest.php 项目: visor/nano
 public function testShouldStoreApplicationOnlyOnce()
 {
     $original = Nano::app();
     $this->mixin->backup();
     $new = \Nano\Application::create()->withConfigurationFormat('php')->withRootDir(__DIR__)->configure();
     $this->mixin->backup();
     self::assertInstanceOf('\\Nano\\Application', self::getObjectProperty($this->mixin, 'backup'));
     self::assertSame($original, self::getObjectProperty($this->mixin, 'backup'));
     self::assertNull(Nano::app());
 }
示例#2
0
 protected function setUp()
 {
     $this->app->backup();
     \Nano\Application::create()->withConfigurationFormat('php')->withRootDir($GLOBALS['application']->rootDir)->withModule('some', __DIR__ . '/_files')->configure();
     $this->dictionary = new \Nano\L10n\Dictionary(new \Nano\L10n\Locale('ru'));
 }
示例#3
0
 public function testFactoryMethod()
 {
     self::assertInstanceOf('\\Nano\\Application', \Nano\Application::create());
     self::assertNotSame(\Nano\Application::create(), \Nano\Application::create());
 }