コード例 #1
0
ファイル: UnionTypeTest.php プロジェクト: sekjun9878/juggler
 public function testTypeOfUnion()
 {
     $type = new UnionType(new StringType(), new IntType());
     $x = new UnionType(new StringType(), new IntType());
     $y = new UnionType(new StringType(), new NullType());
     $this->assertTrue($x->typeof($type));
     $this->assertFalse($y->typeof($type));
 }