malkusch\lock\mutex\LockMutexTest::testLockFails PHP Метод

testLockFails() публичный Метод

Tests lock() fails and the code is not executed.
public testLockFails ( )
    public function testLockFails()
    {
        $this->mutex->expects($this->any())->method("lock")->willThrowException(new LockAcquireException());
        $this->mutex->synchronized(function () {
            $this->fail("Should not execute code.");
        });
    }