Dumplie\Metadata\Tests\Integration\Generic\DateTimeTypeTestCase::setUp PHP Method

setUp() public method

public setUp ( )
    public function setUp()
    {
        $this->defaultDate = new \DateTimeImmutable("2004-02-12T15:19:21+00:00");
        $this->storage = $this->createStorage();
        $hydrator = new DefaultHydrator($this->storage);
        $this->schemaBuilder = new Schema\Builder("date");
        $productSchema = new Schema\TypeSchema("test", ["without_default" => new DateTimeField(null, true, [], 'Y-m-d H:i:s'), "with_default" => new DateTimeField($this->defaultDate, true, [], 'Y-m-d H:i:s')]);
        $this->schemaBuilder->addType($productSchema);
        $this->registry = new MetadataAccessRegistry($this->storage, $this->schemaBuilder, $hydrator);
        $this->storage->alter($this->schemaBuilder->build());
    }