public function testTypeOfScalar() { $type = new StringType(); $x = new UnionType(new StringType(), new IntType()); $this->assertFalse($type->typeof($x)); $this->assertFalse($x->typeof($type)); }
public function testJuggleUnion() { $x = new StringType(); $this->assertInstanceOf(FloatType::class, $x->juggle(new UnionType(new FloatType(), new ArrayType()))); }