/** * @group Broken */ public function testGetModuleUrl() { $params = array('moduleId' => WikiaHubsModuleSliderService::MODULE_ID, 'date' => 123456); $titleMock = $this->getMock('Title', array('getLocalURL')); $titleMock->expects($this->once())->method('getLocalURL')->with($this->equalTo($params))->will($this->returnValue('test returned url')); $specialPageMock = $this->getMock('SpecialPage', array('getTitleFor')); $specialPageMock->staticExpects($this->once())->method('getTitleFor')->with($this->equalTo('EditHub'), $this->equalTo('editHub'))->will($this->returnValue($titleMock)); $model = new EditHubModel(); $model->setSpecialPageClass($specialPageMock); $url = $model->getModuleUrl($params['date'], $params['moduleId']); $this->assertEquals('test returned url', $url); }