You are here

public function SymfonyFileLocatorTest::testFindMappingFileWithCustomNsSeparator in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/SymfonyFileLocatorTest.php \Doctrine\Tests\Common\Persistence\Mapping\SymfonyFileLocatorTest::testFindMappingFileWithCustomNsSeparator()

@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

vendor/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)));
  }
}