Cassandra\Type\UserTypeTest::testCreatesEmptyUserType PHP Method

testCreatesEmptyUserType() public method

    public function testCreatesEmptyUserType()
    {
        $udt = Type::userType('a', Type::varchar())->create();
        $this->assertEquals(1, count($udt));
        $this->assertEquals($udt->get('a'), null);
        $udt = Type::userType('a', Type::varchar(), 'b', Type::int())->create();
        $this->assertEquals(2, count($udt));
        $this->assertEquals($udt->get('a'), null);
        $this->assertEquals($udt->get('b'), null);
        $udt = Type::userType('a', Type::varchar(), 'b', Type::int(), 'c', Type::bigint())->create();
        $this->assertEquals(3, count($udt));
        $this->assertEquals($udt->get('a'), null);
        $this->assertEquals($udt->get('b'), null);
        $this->assertEquals($udt->get('c'), null);
    }