public function userTypeWithMultipleEmptyComponents()
 {
     $scalarCassandraTypes = $this->scalarCassandraTypes();
     $sizes = range(2, count($scalarCassandraTypes));
     return array_map(function ($size) use($scalarCassandraTypes) {
         $types = array();
         for ($i = 0; $i < $size; $i++) {
             $types["field{$i}"] = $scalarCassandraTypes[$i][0];
         }
         $user = new UserTypeValue($types);
         $userType = $user->type()->withName(self::userTypeString($user->type()));
         return array($userType, $user);
     }, $sizes);
 }
예제 #2
0
 /**
  * @dataProvider cassandraTypes
  */
 public function testReturnsItsType($type)
 {
     $udt = new UserTypeValue(array('name1' => $type));
     $types = $udt->type()->types();
     $this->assertEquals($type, $types['name1']);
 }