* * 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:----CkvFyCReRN5lEz5+2okBCtAxMJwtMSwZPfzBaGKmDaQqC7UpOx63gxA0z5Xp0q85ihFn04J8evR4Xf83BCicC/fQd5zS8hJ0EXCEYYEvHbr+Rz8vySoJvLp6gK2ZmAeznRGEFnZbixo4H5/2pHwyxtcb8DCl44bRP81sJh/CGxxtTWkFlr3LUIjNke+dlN2hqQ817tgxQoXUW1KB58H8B2rczIiUF0eSNGUaQE3tm3gRnqU8CNgXOoqxbJPNtEB1foJnqQPABdZsdoDk8NWa2E7P/mmIHRJJ/8No1nc1iHilvMoOosx+8ZhIN0fWMPvOX5Dpoe8zqwi08O29hl8v/nZkGKi4txgFYI/SOo/N4/xdvYzOdu1GzUHApF7ML5dvbd4a1dm4qNF9/cAMYDyFyCVNlGibPryC8Wi9u6E3V41Wh3W6XetDSp4TuzjLb/ZAqXGmg8btHRp/MpqEpLx496IRnPKV2NZVMSz61EE00CeFgOIbcQvUxvnu3xz10yxTRrjwhSnc5CqA0PvP7GrVH+Orawsh94FDP+yEdKjhbpjHrlbY6A2IivOzP1t6Ej8/BYUa1Cuc5VihWwgwvC22+w5wlfFLSizzRTr49wqCQfCOLlNlvPtgdk2U+c2caPBUezzbjodB6N9m2S58bmZIfzQyO3lcAau9okJ9dvs/1fI=----ATTACHMENT:----NDY1NzQ3NjQ1MTkwMTQwNSA4Nzc0MzAyNTUxNzI1MDA4IDUxNzIzODE0ODEwNTg0MjQ=