public function AnnotationFileLoaderTest::testSupports

@covers Symfony\Component\Routing\Loader\AnnotationFileLoader::supports

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php, line 40

Class

AnnotationFileLoaderTest

Namespace

Symfony\Component\Routing\Tests\Loader

Code

public function testSupports() {
  $fixture = __DIR__ . '/../Fixtures/annotated.php';
  $this
    ->assertTrue($this->loader
    ->supports($fixture), '->supports() returns true if the resource is loadable');
  $this
    ->assertFalse($this->loader
    ->supports('foo.foo'), '->supports() returns true if the resource is loadable');
  $this
    ->assertTrue($this->loader
    ->supports($fixture, 'annotation'), '->supports() checks the resource type if specified');
  $this
    ->assertFalse($this->loader
    ->supports($fixture, 'foo'), '->supports() checks the resource type if specified');
}