Contao\CoreBundle\Test\Monolog\ContaoTableProcessorTest::mockContainerWithScope PHP Method

mockContainerWithScope() private method

Mocks a Symfony container with scope.
private mockContainerWithScope ( string $scope ) : Symfony\Component\DependencyInjection\ContainerInterface | PHPUnit_Framework_MockObject_MockObject
$scope string
return Symfony\Component\DependencyInjection\ContainerInterface | PHPUnit_Framework_MockObject_MockObject
    private function mockContainerWithScope($scope)
    {
        $request = new Request([], [], ['_scope' => $scope]);
        $requestStack = new RequestStack();
        $requestStack->push($request);
        $container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
        $container->expects($this->any())->method('get')->with('request_stack')->willReturn($requestStack);
        return $container;
    }