Exemplo n.º 1
0
 public function testFindVoteById()
 {
     $id = 123;
     $vote = $this->getMock('FOS\\CommentBundle\\Model\\VoteInterface');
     $this->repository->expects($this->once())->method('findOneBy')->with(array('id' => $id))->will($this->returnValue($vote));
     $manager = new VoteManager($this->dispatcher, $this->em, $this->class);
     $result = $manager->findVoteById($id);
     $this->assertEquals($vote, $result);
 }