verifyCollection example

$resolver = new LoaderResolver([
            new YamlFileLoader($locator),
            new AnnotationFileLoader($locatornew TraceableAnnotationClassLoader()),
            $this->loader,
        ]);
        $this->loader->setResolver($resolver);
    }

    public function testLoadDirectory()
    {
        $collection = $this->loader->load(__DIR__.'/../Fixtures/directory', 'directory');
        $this->verifyCollection($collection);
    }

    public function testImportDirectory()
    {
        $collection = $this->loader->load(__DIR__.'/../Fixtures/directory_import', 'directory');
        $this->verifyCollection($collection);
    }

    private function verifyCollection(RouteCollection $collection)
    {
        $routes = $collection->all();

        
Home | Imprint | This part of the site doesn't use cookies.