/** * Test that settings array a properly merged when defined in several * scopes. * * @dataProvider fullMapConfigArrayProvider */ public function testFullMapConfigArray($testId, $siteaccess, array $groups, array $defaultValue, array $globalValue, array $config, $options, array $expected, $customSANodeKey = null) { $this->contextualizer->setAvailableSiteAccesses($config['siteaccess']['list']); $this->contextualizer->setGroupsBySiteAccess(array($siteaccess => $groups)); $hasParameterMap = array(array($this->namespace . '.' . ConfigResolver::SCOPE_DEFAULT . '.' . $testId, true), array($this->namespace . '.' . ConfigResolver::SCOPE_GLOBAL . '.' . $testId, true)); $getParameterMap = array(array($this->namespace . '.' . ConfigResolver::SCOPE_DEFAULT . '.' . $testId, $defaultValue), array($this->namespace . '.' . ConfigResolver::SCOPE_GLOBAL . '.' . $testId, $globalValue)); $this->container->expects($this->any())->method('hasParameter')->will($this->returnValueMap($hasParameterMap)); $this->container->expects($this->any())->method('getParameter')->will($this->returnValueMap($getParameterMap)); $this->container->expects($this->any())->method('setParameter')->with($this->equalTo("{$this->namespace}.{$siteaccess}.{$testId}"), $this->equalTo($expected)); if ($customSANodeKey !== null) { $this->contextualizer->setSiteAccessNodeName($customSANodeKey); } $this->contextualizer->mapConfigArray($testId, $config, $options); }