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)); }