You are here

public function FinderTest::testRelativePathname in Database Sanitize 7

File

vendor/symfony/finder/Tests/FinderTest.php, line 377

Class

FinderTest

Namespace

Symfony\Component\Finder\Tests

Code

public function testRelativePathname() {
  $finder = $this
    ->buildFinder()
    ->in(self::$tmpDir)
    ->sortByName();
  $paths = array();
  foreach ($finder as $file) {
    $paths[] = $file
      ->getRelativePathname();
  }
  $ref = array(
    'test.php',
    'toto',
    'test.py',
    'foo',
    'foo' . \DIRECTORY_SEPARATOR . 'bar.tmp',
    'foo bar',
  );
  sort($paths);
  sort($ref);
  $this
    ->assertEquals($ref, $paths);
}