malkusch\lock\mutex\SpinlockMutexTest::testFailAcquireLock PHP Method

testFailAcquireLock() public method

Tests failing to acquire the lock.
public testFailAcquireLock ( )
    public function testFailAcquireLock()
    {
        $mutex = $this->getMockForAbstractClass(SpinlockMutex::class, ["test"]);
        $mutex->expects($this->any())->method("acquire")->willThrowException(new LockAcquireException());
        $mutex->synchronized(function () {
            $this->fail("execution is not expected");
        });
    }