getTypes() public method

public getTypes ( ) : ObjectType[]
return ObjectType[]
コード例 #1
0
 /**
  * @it allows a thunk for Union\'s types
  */
 public function testAllowsThunkForUnionTypes()
 {
     $union = new UnionType(['name' => 'ThunkUnion', 'types' => function () {
         return [$this->objectType];
     }]);
     $types = $union->getTypes();
     $this->assertEquals(1, count($types));
     $this->assertSame($this->objectType, $types[0]);
 }