/**
  * @test
  */
 public function setStoragePidWithStdWrap()
 {
     unset($this->abstractConfigurationManager);
     $this->abstractConfigurationManager = $this->getMock('Tx_Extbase_Configuration_AbstractConfigurationManager', array('getSwitchableControllerActions', 'getContextSpecificFrameworkConfiguration', 'getTypoScriptSetup', 'getPluginConfiguration'));
     $pluginConfiguration = $this->testPluginConfiguration;
     $pluginConfiguration['persistence']['storagePid'] = array('cObject' => array('value' => '8,3', '_typoScriptNodeValue' => 'TEXT'));
     $this->abstractConfigurationManager->expects($this->once())->method('getTypoScriptSetup')->will($this->returnValue($this->testTypoScriptSetup));
     $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($pluginConfiguration));
     $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue(NULL));
     $expectedResult = array('settings' => array('setting1' => 'overriddenValue1', 'setting2' => 'value2', 'setting3' => 'additionalValue'), 'view' => array('viewSub' => array('key1' => 'overridden', 'key2' => 'value2', 'key3' => 'new key')), 'persistence' => array('storagePid' => '8,3'), 'controllerConfiguration' => NULL);
     $actualResult = $this->abstractConfigurationManager->getConfiguration('CurrentExtensionName', 'CurrentPluginName');
     $this->assertEquals($expectedResult, $actualResult);
 }
 /**
  * Returns the specified configuration.
  * The actual configuration will be merged from different sources in a defined order.
  *
  * Note that this is a low level method and only makes sense to be used by Extbase internally.
  *
  * @param string $configurationType The kind of configuration to fetch - must be one of the CONFIGURATION_TYPE_* constants
  * @param string $extensionName if specified, the configuration for the given extension will be returned.
  * @param string $pluginName if specified, the configuration for the given plugin will be returned.
  * @return array The configuration
  */
 public function getConfiguration($configurationType, $extensionName = NULL, $pluginName = NULL)
 {
     switch ($configurationType) {
         case self::CONFIGURATION_TYPE_SETTINGS:
             $configuration = $this->concreteConfigurationManager->getConfiguration($extensionName, $pluginName);
             return $configuration['settings'];
         case self::CONFIGURATION_TYPE_FRAMEWORK:
             return $this->concreteConfigurationManager->getConfiguration($extensionName, $pluginName);
         case self::CONFIGURATION_TYPE_FULL_TYPOSCRIPT:
             return $this->concreteConfigurationManager->getTypoScriptSetup();
         default:
             throw new Tx_Extbase_Configuration_Exception_InvalidConfigurationTypeException('Invalid configuration type "' . $configurationType . '"', 1206031879);
     }
 }