/**
  * @test
  */
 public function getPluginConfigurationRecursivelyMergesExtensionAndPluginConfiguration()
 {
     $testExtensionSettings = array('settings.' => array('foo' => 'bar', 'some.' => array('nested' => 'value')));
     $testExtensionSettingsConverted = array('settings' => array('foo' => 'bar', 'some' => array('nested' => 'value')));
     $testPluginSettings = array('settings.' => array('some.' => array('nested' => 'valueOverridde', 'new' => 'value')));
     $testPluginSettingsConverted = array('settings' => array('some' => array('nested' => 'valueOverridde', 'new' => 'value')));
     $testSetup = array('module.' => array('tx_someextensionname.' => $testExtensionSettings, 'tx_someextensionname_somepluginname.' => $testPluginSettings));
     $this->mockTypoScriptService->expects($this->at(0))->method('convertTypoScriptArrayToPlainArray')->with($testExtensionSettings)->will($this->returnValue($testExtensionSettingsConverted));
     $this->mockTypoScriptService->expects($this->at(1))->method('convertTypoScriptArrayToPlainArray')->with($testPluginSettings)->will($this->returnValue($testPluginSettingsConverted));
     $this->backendConfigurationManager->expects($this->once())->method('getTypoScriptSetup')->will($this->returnValue($testSetup));
     $expectedResult = array('settings' => array('foo' => 'bar', 'some' => array('nested' => 'valueOverridde', 'new' => 'value')));
     $actualResult = $this->backendConfigurationManager->_call('getPluginConfiguration', 'SomeExtensionName', 'SomePluginName');
     $this->assertEquals($expectedResult, $actualResult);
 }