You are here

public function SymfonyFileLocatorTest::testFindMappingFileWithCustomNsSeparator in Plug 7

@dataProvider customNamespaceLookupQueryProvider

Parameters

$separator string Directory separator to test against:

$dir string Path to load mapping data from:

$files array Files to lookup classnames:

Throws

\Doctrine\Common\Persistence\Mapping\MappingException

File

lib/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/SymfonyFileLocatorTest.php, line 136

Class

SymfonyFileLocatorTest

Namespace

Doctrine\Tests\Common\Persistence\Mapping

Code

public function testFindMappingFileWithCustomNsSeparator($separator, $dir, $files) {
  $path = __DIR__ . $dir;
  $prefix = "Foo";
  $locator = new SymfonyFileLocator(array(
    $path => $prefix,
  ), ".yml", $separator);
  foreach ($files as $filePath => $className) {
    $this
      ->assertEquals(realpath($path . '/' . $filePath), realpath($locator
      ->findMappingFile($className)));
  }
}