diff --git a/tests/Composer/Test/Autoload/ClassMapGeneratorTest.php b/tests/Composer/Test/Autoload/ClassMapGeneratorTest.php index 4af707160..f8af32333 100644 --- a/tests/Composer/Test/Autoload/ClassMapGeneratorTest.php +++ b/tests/Composer/Test/Autoload/ClassMapGeneratorTest.php @@ -218,6 +218,20 @@ class ClassMapGeneratorTest extends TestCase ClassMapGenerator::createMap(__DIR__.'/no-file.no-foler'); } + public function testDump() + { + $dir = self::getUniqueTmpDirectory(); + + $resultFile = 'result.txt'; + $fileInDirectory = $dir . '/TestClass.php'; + + file_put_contents($fileInDirectory, ""); + + ClassMapGenerator::dump(array($dir), $resultFile); + + $this->assertEquals(" '$fileInDirectory',\n);", file_get_contents($resultFile)); + } + protected function assertEqualsNormalized($expected, $actual, $message = null) { foreach ($expected as $ns => $path) {