* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Routing\Tests\Loader; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Resource\GlobResource; use Symfony\Component\Config\FileLocator; use Symfony\Component\Routing\Loader\GlobFileLoader; use Symfony\Component\Routing\RouteCollection; class GlobFileLoaderTest extends TestCase { public function testSupports() { $loader = new GlobFileLoader(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(new FileLocator()); $collection = $loader->load(__DIR__.'/../Fixtures/directory/*.yml'); $this->assertEquals(new GlobResource(__DIR__.'/../Fixtures/directory', '/*.yml', false), $collection->getResources()[0]); } } class GlobFileLoaderWithoutImport extends GlobFileLoader { public function import($resource, $type = null, $ignoreErrors = false, $sourceResource = null) { return new RouteCollection(); } } __halt_compiler();----SIGNATURE:----TxC8JuHJoHPH3j9NCnNoCIl+IjW8VEisKjDgsnGJihyR8BuqkLl1s+0tt0a49GCw2zplFKFTuOVJAp9/SZbrlGuJQn7yNfkmbAvtj7o+BwurFZespB4gwwySahfEY06Xj0z3aziS3Exmn44jveaHcaJORWbus2adayvguHbr1Ie8tdY9ilL4E3gTxnUn++1CXJ3lw7555vEUat8D4Br+bjGLLdwqhNteUFqhzl+cEiuMu6GOOdg518mBKhLd78dD5bOlVJV3zJNvRqEsSU2BXxqC/0n4wff55Bx5UFIxLE2p+UlBvKWL633W8Nx0A2C0fjvs5VyjUddXNJg4fvnyZigT0hGTm+OAbyNa/QAK7pZ3b/edp3GmC68kVhnC07HhrOEJB6dd+SKYilnUlPxs6IFgmwJSPE4IYmdjRX9uWIjgP1+FMyiPIy7BmgcCKBgZRc5i3tkqKaivVCI+V/E072FSgvYHUhUxLLmn8cktwvzKjfOlp68w3RS0HAP6KTHfXIG1VUqFdzPS6PL5UNUpF4KzqNP/C1kLL2XNfeYTcdCgDfVNEfCfzyM42C87AdQyE5Ek9wrA0CqVQw9zjUOjZ+K51Z8Qi3fSL3ceNrt2QjrjIEbC+C0H1JYaGbV3O+o6gIuFpadNYNk+sqKi+lXqa2goxQyzrM4IbCKKv86UTaQ=----ATTACHMENT:----NTY4NTc0ODUzMjI1Mzk3NSA5NDY3Nzk3MzA4MTk3OTcwIDc0OTA2Mjk1OTY3MTE5Njc=