Contao\CoreBundle\Test\Framework\ContaoFrameworkTest::testWithoutScope PHP Méthode

testWithoutScope() public méthode

Tests initializing the framework without a scope.
public testWithoutScope ( )
    public function testWithoutScope()
    {
        $request = new Request();
        $request->attributes->set('_route', 'dummy');
        $request->attributes->set('_contao_referer_id', 'foobar');
        $container = $this->mockContainerWithContaoScopes();
        $container->get('request_stack')->push($request);
        $framework = $this->mockContaoFramework($container->get('request_stack'), $this->mockRouter('/contao/install'));
        $framework->setContainer($container);
        $framework->initialize();
        $this->assertTrue(defined('TL_MODE'));
        $this->assertTrue(defined('TL_START'));
        $this->assertTrue(defined('TL_ROOT'));
        $this->assertTrue(defined('TL_REFERER_ID'));
        $this->assertTrue(defined('TL_SCRIPT'));
        $this->assertTrue(defined('BE_USER_LOGGED_IN'));
        $this->assertTrue(defined('FE_USER_LOGGED_IN'));
        $this->assertTrue(defined('TL_PATH'));
        $this->assertNull(TL_MODE);
        $this->assertEquals($this->getRootDir(), TL_ROOT);
        $this->assertEquals('foobar', TL_REFERER_ID);
        $this->assertEquals('contao/install', TL_SCRIPT);
        $this->assertEquals('', TL_PATH);
    }