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

test_del() public method

public test_del ( )
    public function test_del()
    {
        $this->mem->add(__METHOD__ . 'd1', 1);
        $call = $this->mem->del(__METHOD__ . 'd1');
        $this->assertTrue($call);
        $check = $this->mem->read(__METHOD__ . 'd1');
        $this->assertTrue(empty($check))->addCommentary('variables still in cache');
        $this->mem->add(__METHOD__ . 'd1', 1);
        $this->mem->add(__METHOD__ . 'd2', 1);
        $call = $this->mem->del(array(__METHOD__ . 'd1', __METHOD__ . 'd2'));
        $this->assertTrue($call);
        $check = $this->mem->read(array(__METHOD__ . 'd1', __METHOD__ . 'd2'));
        $this->assertTrue(empty($check))->addCommentary('variables still in cache: ' . print_r($check, 1));
    }