diff --git a/tests/Composer/Test/Autoload/ClassMapGeneratorTest.php b/tests/Composer/Test/Autoload/ClassMapGeneratorTest.php index d367d72e0f3f..1109e64d2b72 100644 --- a/tests/Composer/Test/Autoload/ClassMapGeneratorTest.php +++ b/tests/Composer/Test/Autoload/ClassMapGeneratorTest.php @@ -60,6 +60,12 @@ public function getTestCreateMapTests() 'Foo\\Third' => realpath(__DIR__) . '/Fixtures/classmap/StripNoise.php', 'Foo\\SlashedA' => realpath(__DIR__) . '/Fixtures/classmap/BackslashLineEndingString.php', 'Foo\\SlashedB' => realpath(__DIR__) . '/Fixtures/classmap/BackslashLineEndingString.php', + 'Foo\\VeryLongHeredoc' => realpath(__DIR__) . '/Fixtures/classmap/VeryLongHeredoc.php', + 'Foo\\ClassAfterLongHereDoc' => realpath(__DIR__) . '/Fixtures/classmap/VeryLongHeredoc.php', + 'Foo\\VeryLongPHP73Heredoc' => realpath(__DIR__) . '/Fixtures/classmap/VeryLongPHP73Heredoc.php', + 'Foo\\VeryLongPHP73Nowdoc' => realpath(__DIR__) . '/Fixtures/classmap/VeryLongPHP73Nowdoc.php', + 'Foo\\ClassAfterLongNowDoc' => realpath(__DIR__) . '/Fixtures/classmap/VeryLongPHP73Nowdoc.php', + 'Foo\\VeryLongNowdoc' => realpath(__DIR__) . '/Fixtures/classmap/VeryLongNowdoc.php', 'Unicode\\↑\\↑' => realpath(__DIR__) . '/Fixtures/classmap/Unicode.php', 'ShortOpenTag' => realpath(__DIR__) . '/Fixtures/classmap/ShortOpenTag.php', 'ShortOpenTagDocblock' => realpath(__DIR__) . '/Fixtures/classmap/ShortOpenTagDocblock.php', @@ -247,25 +253,6 @@ public function testDump() $fs->removeDirectory($tempDir); } - public function testCreateMapDoesNotHitRegexBacktraceLimit() - { - $expected = array( - 'Foo\\StripNoise' => realpath(__DIR__) . '/Fixtures/pcrebacktracelimit/StripNoise.php', - 'Foo\\VeryLongHeredoc' => realpath(__DIR__) . '/Fixtures/pcrebacktracelimit/VeryLongHeredoc.php', - 'Foo\\ClassAfterLongHereDoc' => realpath(__DIR__) . '/Fixtures/pcrebacktracelimit/VeryLongHeredoc.php', - 'Foo\\VeryLongPHP73Heredoc' => realpath(__DIR__) . '/Fixtures/pcrebacktracelimit/VeryLongPHP73Heredoc.php', - 'Foo\\VeryLongPHP73Nowdoc' => realpath(__DIR__) . '/Fixtures/pcrebacktracelimit/VeryLongPHP73Nowdoc.php', - 'Foo\\ClassAfterLongNowDoc' => realpath(__DIR__) . '/Fixtures/pcrebacktracelimit/VeryLongPHP73Nowdoc.php', - 'Foo\\VeryLongNowdoc' => realpath(__DIR__) . '/Fixtures/pcrebacktracelimit/VeryLongNowdoc.php', - ); - - ini_set('pcre.backtrack_limit', '30000'); - $result = ClassMapGenerator::createMap(__DIR__ . '/Fixtures/pcrebacktracelimit'); - ini_restore('pcre.backtrack_limit'); - - $this->assertEqualsNormalized($expected, $result); - } - protected function assertEqualsNormalized($expected, $actual, $message = '') { foreach ($expected as $ns => $path) { diff --git a/tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/VeryLongHeredoc.php b/tests/Composer/Test/Autoload/Fixtures/classmap/VeryLongHeredoc.php similarity index 100% rename from tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/VeryLongHeredoc.php rename to tests/Composer/Test/Autoload/Fixtures/classmap/VeryLongHeredoc.php diff --git a/tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/VeryLongNowdoc.php b/tests/Composer/Test/Autoload/Fixtures/classmap/VeryLongNowdoc.php similarity index 100% rename from tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/VeryLongNowdoc.php rename to tests/Composer/Test/Autoload/Fixtures/classmap/VeryLongNowdoc.php diff --git a/tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/VeryLongPHP73Heredoc.php b/tests/Composer/Test/Autoload/Fixtures/classmap/VeryLongPHP73Heredoc.php similarity index 100% rename from tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/VeryLongPHP73Heredoc.php rename to tests/Composer/Test/Autoload/Fixtures/classmap/VeryLongPHP73Heredoc.php diff --git a/tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/VeryLongPHP73Nowdoc.php b/tests/Composer/Test/Autoload/Fixtures/classmap/VeryLongPHP73Nowdoc.php similarity index 100% rename from tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/VeryLongPHP73Nowdoc.php rename to tests/Composer/Test/Autoload/Fixtures/classmap/VeryLongPHP73Nowdoc.php diff --git a/tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/StripNoise.php b/tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/StripNoise.php deleted file mode 100644 index 8f93e842751c..000000000000 --- a/tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/StripNoise.php +++ /dev/null @@ -1,87 +0,0 @@ -'; - } - - public function test_simple_string() - { - return 'class FailSimpleString {}'; - } -}