Contao\CoreBundle\Test\DependencyInjection\Compiler\AddResourcesPathsPassTest::testGetResourcesPath PHP Method

testGetResourcesPath() public method

Tests the getResourcesPath() method.
    public function testGetResourcesPath()
    {
        $pass = new AddResourcesPathsPass();
        $container = new ContainerBuilder();
        $container->setParameter('kernel.root_dir', $this->getRootDir() . '/app');
        $container->setParameter('kernel.bundles', ['FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle', 'ContaoTestBundle' => 'Contao\\TestBundle\\ContaoTestBundle', 'foobar' => 'Contao\\CoreBundle\\HttpKernel\\Bundle\\ContaoModuleBundle']);
        $pass->process($container);
        $this->assertTrue($container->hasParameter('contao.resources_paths'));
        $path = $this->getRootDir() . '/vendor/contao/test-bundle';
        if ('\\' === DIRECTORY_SEPARATOR) {
            $path = strtr($path, '/', '\\');
        }
        $this->assertEquals([$path . '/Resources/contao', $this->getRootDir() . '/system/modules/foobar', $this->getRootDir() . '/app/Resources/contao'], $container->getParameter('contao.resources_paths'));
    }