Contao\CoreBundle\Test\EventListener\ContainerScopeListenerTest::setUp PHP Method

setUp() protected method

protected setUp ( )
    protected function setUp()
    {
        parent::setUp();
        if (!method_exists('Symfony\\Component\\DependencyInjection\\Container', 'enterScope')) {
            $this->markTestSkipped('Container scopes are not supported in this Symfony version.');
        }
        $this->container = new ContainerBuilder();
        $this->container->addScope(new Scope('request'));
        $this->container->enterScope('request');
    }