Contao\CoreBundle\Test\TestCase::mockKernel PHP Method

mockKernel() protected method

Mocks a Contao kernel.
protected mockKernel ( ) : Kernel | PHPUnit_Framework_MockObject_MockObject
return Symfony\Component\HttpKernel\Kernel | PHPUnit_Framework_MockObject_MockObject
    protected function mockKernel()
    {
        $kernel = $this->getMock('Symfony\\Component\\HttpKernel\\Kernel', ['registerBundles', 'registerContainerConfiguration', 'boot', 'shutdown', 'getBundles', 'isClassInActiveBundle', 'getBundle', 'locateResource', 'getName', 'getEnvironment', 'isDebug', 'getRootDir', 'getContainer', 'getStartTime', 'getCacheDir', 'getLogDir', 'getCharset', 'handle', 'serialize', 'unserialize'], ['test', false]);
        $container = $this->mockContainerWithContaoScopes();
        $kernel->expects($this->any())->method('getContainer')->willReturn($container);
        return $kernel;
    }