malkusch\lock\mutex\LockMutexTest::testUnlockAfterException PHP Method

testUnlockAfterException() public method

Tests unlock() is called after an exception.
    public function testUnlockAfterException()
    {
        $this->mutex->expects($this->once())->method("unlock");
        try {
            $this->mutex->synchronized(function () {
                throw new \DomainException();
            });
        } catch (\DomainException $e) {
            // expected
        }
    }