Jamm\Memory\Tests\TestMemoryObject::test_lock_key PHP Method

test_lock_key() public method

public test_lock_key ( )
    public function test_lock_key()
    {
        $this->mem->save(__METHOD__, 1);
        $call = $this->mem->lock_key(__METHOD__, $l);
        $this->assertTrue($call);
        if ($call) {
            $check = $this->mem->lock_key(__METHOD__, $l1);
            $this->assertTrue(!$check)->addCommentary('key was not locked');
            $this->mem->unlock_key($l);
        }
    }