eZ\Bundle\EzPublishCoreBundle\Tests\ConfigResolverTest::testHasParameterWithNamespaceAndScope PHP Метод

testHasParameterWithNamespaceAndScope() публичный Метод

public testHasParameterWithNamespaceAndScope ( $defaultMatch, $groupMatch, $scopeMatch, $globalMatch, $expectedResult )
    public function testHasParameterWithNamespaceAndScope($defaultMatch, $groupMatch, $scopeMatch, $globalMatch, $expectedResult)
    {
        $paramName = 'foo.bar';
        $namespace = 'my.namespace';
        $scope = 'another_siteaccess';
        $groupName = 'my_group';
        $configResolver = $this->getResolver('ezsettings', ConfigResolver::UNDEFINED_STRATEGY_EXCEPTION, array($this->siteAccess->name => array('some_group'), $scope => array($groupName)));
        $this->containerMock->expects($this->atLeastOnce())->method('hasParameter')->will($this->returnValueMap(array(array("{$namespace}.default.{$paramName}", $defaultMatch), array("{$namespace}.{$groupName}.{$paramName}", $groupMatch), array("{$namespace}.{$scope}.{$paramName}", $scopeMatch), array("{$namespace}.global.{$paramName}", $globalMatch))));
        $this->assertSame($expectedResult, $configResolver->hasParameter($paramName, $namespace, $scope));
    }