Cassandra\SetTest::testCompositeKeys PHP Метод

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

public testCompositeKeys ( $type )
    public function testCompositeKeys($type)
    {
        $map = Type::set($type)->create();
        $map->add($type->create("a", "1", "b", "2"));
        $this->assertTrue($map->has($type->create("a", "1", "b", "2")));
        $this->assertEquals(1, count($map));
        $map->add($type->create("c", "3", "d", "4", "e", "5"));
        $this->assertTrue($map->has($type->create("c", "3", "d", "4", "e", "5")));
        $this->assertEquals(2, count($map));
        $map->remove($type->create("a", "1", "b", "2"));
        $this->assertFalse($map->has($type->create("a", "1", "b", "2")));
        $this->assertEquals(1, count($map));
        $map->remove($type->create("c", "3", "d", "4", "e", "5"));
        $this->assertFalse($map->has($type->create("c", "3", "d", "4", "e", "5")));
        $this->assertEquals(0, count($map));
    }