public function testGetEntityIdByCode() { $entityCode = 'test'; $result = 22; $this->resource->expects($this->once())->method('getEntityIdByCode')->with($this->equalTo($entityCode))->will($this->returnValue($result)); $this->assertSame($result, $this->review->getEntityIdByCode($entityCode)); }