assertEquals(Type::default(Type::BOOL), false); $this->assertEquals(Type::default(Type::INTEGER), 0); $this->assertEquals(Type::default(Type::FLOAT), 0.0); $this->assertEquals(Type::default(Type::STRING), ''); $this->assertEquals(Type::default(Type::ARRAY), []); $this->assertEquals(Type::default(Type::OBJECT), null); $this->assertEquals(Type::default(Type::RESOURCE), null); $this->assertEquals(Type::default(Type::CLOSED_RESOURCE), null); $this->assertEquals(Type::default(Type::NULL), null); $this->assertEquals(Type::default(Type::UNKNOWN), null); } public function testClassTree(): void { $array1 = Type::classTree(new AString('the')); $array2 = [ 'Index\\IString', 'Stringable', 'Traversable', 'Index\\Serialisation\\IBencodeSerialisable', 'Index\\IEquatable', 'Index\\ICloneable', 'Index\\IComparable', 'JsonSerializable', 'IteratorAggregate', 'Countable', 'ArrayAccess', 'Index\\AString', ]; $this->assertTrue(XArray::sequenceEquals($array1, $array2)); } }