/** * @covers Applications\Entity\Application::getComments * @covers Applications\Entity\Application::setComments */ public function testSetGetComments() { $comment = new Comment(); $comment->setMessage('test foo bar')->setDateCreated(new \DateTime())->setUser(new User()); $comments = new ArrayCollection(); $comments->add($comment); $this->target->setComments($comments); $this->assertEquals($comments, $this->target->getComments()); }