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