public function setUp() { $this->classMapper = new DefaultMapper(new DefaultNameExtractor()); $this->classMapper->register(Serializable::class); $this->classMapper->register(\DateTime::class); $this->classMapper->register(\DateTimeImmutable::class); $this->classMapper->register(\DateTimeZone::class); $this->hydratorFactory = new HydratorFactory(__DIR__ . DIRECTORY_SEPARATOR . 'cache', true); $this->dataFormatter = new FlatFormatter(); $this->instantiator = new Instantiator(); }