Contao\CoreBundle\Test\Framework\ContaoFrameworkTest::testWithoutRoute PHP Method

testWithoutRoute() public method

Tests initializing the framework with request but without route.
public testWithoutRoute ( )
    public function testWithoutRoute()
    {
        $request = new Request();
        $request->setLocale('de');
        $routingLoader = $this->getMock('Symfony\\Component\\Config\\Loader\\LoaderInterface');
        $routingLoader->method('load')->willReturn(new RouteCollection());
        $container = $this->mockContainerWithContaoScopes();
        $container->get('request_stack')->push($request);
        $container->set('routing.loader', $routingLoader);
        $framework = $this->mockContaoFramework($container->get('request_stack'), new Router($container, []));
        $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->assertEquals(null, TL_MODE);
        $this->assertEquals($this->getRootDir(), TL_ROOT);
        $this->assertEquals(null, TL_REFERER_ID);
        $this->assertEquals(null, TL_SCRIPT);
        $this->assertEquals('', TL_PATH);
        $this->assertEquals('de', $GLOBALS['TL_LANGUAGE']);
    }