public function testDateTimeSetter() { $entity = new Entity(); $entity->id = 2; $entity->datetime = Carbon::create(2015, 1, 1, 0, 0, 0); $this->em->persist($entity); $this->em->flush(); }