public function SymfonyFileLocatorTest::testFileExists

File

drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/SymfonyFileLocatorTest.php, line 39

Class

SymfonyFileLocatorTest

Namespace

Doctrine\Tests\Common\Persistence\Mapping

Code

public function testFileExists() {
  $path = __DIR__ . "/_files";
  $prefix = "Foo";
  $locator = new SymfonyFileLocator(array(
    $path => $prefix,
  ), ".yml");
  $this
    ->assertTrue($locator
    ->fileExists("Foo\\stdClass"));
  $this
    ->assertTrue($locator
    ->fileExists("Foo\\global"));
  $this
    ->assertFalse($locator
    ->fileExists("Foo\\stdClass2"));
  $this
    ->assertFalse($locator
    ->fileExists("Foo\\global2"));
}