* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Tests\Loader; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Resource\GlobResource; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\GlobFileLoader; use Symfony\Component\Config\FileLocator; class GlobFileLoaderTest extends TestCase { public function testSupports() { $loader = new GlobFileLoader(new ContainerBuilder(), new FileLocator()); $this->assertTrue($loader->supports('any-path', 'glob'), '->supports() returns true if the resource has the glob type'); $this->assertFalse($loader->supports('any-path'), '->supports() returns false if the resource is not of glob type'); } public function testLoadAddsTheGlobResourceToTheContainer() { $loader = new GlobFileLoaderWithoutImport($container = new ContainerBuilder(), new FileLocator()); $loader->load(__DIR__.'/../Fixtures/config/*'); $this->assertEquals(new GlobResource(__DIR__.'/../Fixtures/config', '/*', false), $container->getResources()[1]); } } class GlobFileLoaderWithoutImport extends GlobFileLoader { public function import($resource, $type = null, $ignoreErrors = false, $sourceResource = null) { } } __halt_compiler();----SIGNATURE:----wRSK7TgmzGuTufJNyORLHhAfy34Rk05dwkPfZY6v45NegW497B69IyK0v+ohO3f4o2VBMu59sd6Tb8Xzu2tIgzMxHxc3hetOWfXYnS/ypMrRyr+TgsmvyFYUVEpeEPnoI6Zg79Xc3HRPu1KLhgE6ZraTSVaj+eXT/BBHsAZTkrENX/NNe3gYZK9NCvd1073joVFqCKCUfQSEXDMCG0sQIu8buAuTcmNvRZ0AZPkDqurfOlei2GVnwu6008bkyskM95uzL2tXIEK3Gj5kHYibUQb/HZ2KniLhrwHeMctYDFDuhEEAgHtuJ3WNzSyZUiCNmbcvUroMQI+iDMk1Z1SZATEzljqSB5WFscSAa1v+x5c8DlMXm84l50AJvjpLbZWhyzX7TTAefUQB4Lkll7GHUBTM1vNEGRZ0D1mXDnZ9fNqAxVoD3mfg7AdGpLRoT7Q0TGJlM3ljJbjvVOMh1+wGQKMaTD9WFTxEaYH+nQV5+wa4k3qFXBl0iDILys2yyA3vT8XySA3DzyV0NgVs5HFYQJJbIPcekcCdxwbWj/4wgN2NesnX6sxM2nv8+xKxIZEraa0ynKs0aEZcC/z6bbE9AwJ4brlKa6FJSBCsy4YZkwSY8JJ4Cuc2wkIA7+HmGMdmpr9OUaZGvVuAzjGZV2RdZXnAuxeo+jzI5vBScoO1Nhg=----ATTACHMENT:----OTgxNjI3MzI0NTM0MDU5MyA2OTM5MjQzNTU3MjU2NDI2IDQ0MTI4NTQwMTcwNDAwMzM=