assertSame(131, $property->value()); $this->assertTrue($property->exists()); $property = new Property(null, false); $this->assertNull($property->value()); $this->assertFalse($property->exists()); } public function testValueCasting(): void { $property = new Property('1', true); $this->assertSame('1', $property->toString()); $this->assertSame(1, $property->toInt()); $this->assertSame(1.0, $property->toFloat()); $this->assertTrue($property->toBool()); $this->assertSame(['1'], $property->toArray()); } }