/** * @test */ public function removeDefaultControllerAndActionRemovesControllerAndActionIfBothAreEqualToTheDefault() { $this->mockExtensionService->expects($this->atLeastOnce())->method('getDefaultControllerNameByPlugin')->with('ExtensionName', 'PluginName')->will($this->returnValue('DefaultController')); $this->mockExtensionService->expects($this->atLeastOnce())->method('getDefaultActionNameByPluginAndController')->with('ExtensionName', 'PluginName', 'DefaultController')->will($this->returnValue('defaultAction')); $arguments = array('controller' => 'DefaultController', 'action' => 'defaultAction', 'foo' => 'bar'); $extensionName = 'ExtensionName'; $pluginName = 'PluginName'; $expectedResult = array('foo' => 'bar'); $actualResult = $this->uriBuilder->_callRef('removeDefaultControllerAndAction', $arguments, $extensionName, $pluginName); $this->assertEquals($expectedResult, $actualResult); }