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()); }
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')); }
public function testFactoryMethod() { self::assertInstanceOf('\\Nano\\Application', \Nano\Application::create()); self::assertNotSame(\Nano\Application::create(), \Nano\Application::create()); }