Contao\CoreBundle\Test\EventListener\CommandSchedulerListenerTest::testIncompleteInstallation PHP Method

testIncompleteInstallation() public method

Tests that the listener does nothing if the installation is incomplete.
    public function testIncompleteInstallation()
    {
        $adapter = $this->getMockBuilder('Contao\\CoreBundle\\Framework\\Adapter')->setMethods(['get', 'isComplete'])->disableOriginalConstructor()->getMock();
        $adapter->expects($this->never())->method('get');
        $adapter->expects($this->any())->method('isComplete')->willReturn(false);
        $this->framework = $this->getMockBuilder('Contao\\CoreBundle\\Framework\\ContaoFramework')->disableOriginalConstructor()->getMock();
        $this->framework->expects($this->any())->method('getAdapter')->willReturn($adapter);
        $this->framework->expects($this->any())->method('isInitialized')->willReturn(true);
        $this->framework->expects($this->never())->method('createInstance');
        $listener = new CommandSchedulerListener($this->framework, $this->mockConnection());
        $listener->onKernelTerminate();
    }