public function testMultipleYaml() { $file1 = __DIR__ . '/../../Fixtures/policies1.yml'; $file2 = __DIR__ . '/../../Fixtures/policies2.yml'; $files = [$file1, $file2]; $provider = new StubYamlPolicyProvider($files); $expectedConfig = ['custom_module' => ['custom_function_1' => null, 'custom_function_2' => ['CustomLimitation']], 'helloworld' => ['foo' => ['bar'], 'baz' => null, 'some' => ['thingy', 'thing', 'but', 'wait']], 'custom_module2' => ['custom_function_3' => null, 'custom_function_4' => ['CustomLimitation2', 'CustomLimitation3']]]; $configBuilder = $this->getMock('\\eZ\\Bundle\\EzPublishCoreBundle\\DependencyInjection\\Configuration\\ConfigBuilderInterface'); $configBuilder->expects($this->exactly(count($files)))->method('addResource')->willReturnMap([[$this->equalTo(new FileResource($file1)), null], [$this->equalTo(new FileResource($file2)), null]]); $configBuilder->expects($this->once())->method('addConfig')->with($expectedConfig); $provider->addPolicies($configBuilder); }