Contao\CoreBundle\Test\Command\InstallCommandTest::testLock PHP Method

testLock() public method

Tests the lock.
public testLock ( )
    public function testLock()
    {
        $lock = new LockHandler('contao:install');
        $lock->lock();
        $command = new InstallCommand('contao:install');
        $tester = new CommandTester($command);
        $code = $tester->execute([]);
        $this->assertEquals(1, $code);
        $this->assertContains('The command is already running in another process.', $tester->getDisplay());
        $lock->release();
    }