Dumplie\Metadata\Tests\Integration\Generic\DecimalTypeTestCase::test_reading_metadata PHP Метод

test_reading_metadata() публичный Метод

    public function test_reading_metadata()
    {
        $mao = $this->registry->getMAO("test");
        $id = MetadataId::generate();
        $mao->save(new Metadata($id, "test", []));
        $metadata = $mao->getBy(['id' => (string) $id]);
        $this->assertSame(null, $metadata->without_default);
        $this->assertSame(0.0, $metadata->with_default);
        $this->assertSame(123.0, $metadata->with_integer);
        $this->assertSame(123.456, $metadata->with_float);
    }