malkusch\lock\mutex\SpinlockMutexTest::testFailReleasingLock PHP Метод

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

Tests failing to release a lock.
    public function testFailReleasingLock()
    {
        $mutex = $this->getMockForAbstractClass(SpinlockMutex::class, ["test"]);
        $mutex->expects($this->any())->method("acquire")->willReturn(true);
        $mutex->expects($this->any())->method("release")->willReturn(false);
        $mutex->synchronized(function () {
        });
    }