public function testGetScreen() { $module = 'xim'; $action = 'doThis'; $expected = new Screen(); $expected->setId(2); $expected->setName('test'); $expected->setModuleId(33); $expected->setActionUrl($action); $screenDao = $this->getMock('ScreenDao', array('getScreen')); $screenDao->expects($this->once())->method('getScreen')->with($module, $action)->will($this->returnValue($expected)); $this->service->setScreenDao($screenDao); $result = $this->service->getScreen($module, $action); $this->assertEquals($expected, $result); }