You are here

public function SymfonyFileLocatorTest::testGetClassNamesWithCustomNsSeparator 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::testGetClassNamesWithCustomNsSeparator()

@dataProvider customNamespaceSeparatorProvider

Parameters

$separator string Directory separator to test against:

$dir string Path to load mapping data from:

Throws

\Doctrine\Common\Persistence\Mapping\MappingException

File

vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/SymfonyFileLocatorTest.php, line 93

Class

SymfonyFileLocatorTest

Namespace

Doctrine\Tests\Common\Persistence\Mapping

Code

public function testGetClassNamesWithCustomNsSeparator($separator, $dir) {
  $path = __DIR__ . $dir;
  $prefix = "Foo";
  $locator = new SymfonyFileLocator(array(
    $path => $prefix,
  ), ".yml", $separator);
  $classes = $locator
    ->getAllClassNames(null);
  sort($classes);
  $this
    ->assertEquals(array(
    "Foo\\stdClass",
    "Foo\\sub\\subClass",
    "Foo\\sub\\subsub\\subSubClass",
  ), $classes);
}