getFaker()->name(), $this->getFaker()->email(), $this->getFaker()->text(500) ); $this->getEntityManager()->persist($comment); $this->getEntityManager()->flush(); $this->getEntityManager()->refresh($post); return $comment; } }