public function testGetReviewRating() { $array = array(0 => 1); $daoMock = $this->getMock("PerformanceReviewDao", array("searchRating")); $daoMock->expects($this->any())->method('searchRating')->will($this->returnValue(array(1))); $service = new PerformanceReviewService(); $service->setDao($daoMock); $this->assertEquals($array, $service->getReviewRating(1)); }