diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 02d9ae9..2957374 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -10,6 +10,7 @@ tests/functional/error-handler/ + tests/functional/fallback-dirs/test.phpt tests/functional/invalid-class/test.phpt tests/functional/nested-composer-projects/test.phpt tests/issue-13/test.phpt diff --git a/tests/functional/fallback-dirs/composer.json b/tests/functional/fallback-dirs/composer.json new file mode 100644 index 0000000..09eefb2 --- /dev/null +++ b/tests/functional/fallback-dirs/composer.json @@ -0,0 +1,15 @@ +{ + "repositories": [ + { + "type": "vcs", + "url": "../../.." + } + ], + "autoload": { + "Kcs\\ClassFinder\\FunctionalTests\\": "src/" + }, + "require": { + "kcs/class-finder": "dev-master", + "symfony/string": "*" + } +} diff --git a/tests/functional/fallback-dirs/fall/Symfony/Component/String/LazyString.php b/tests/functional/fallback-dirs/fall/Symfony/Component/String/LazyString.php new file mode 100644 index 0000000..fa202de --- /dev/null +++ b/tests/functional/fallback-dirs/fall/Symfony/Component/String/LazyString.php @@ -0,0 +1,19 @@ +skipBogonFiles(); +$arr = iterator_to_array($finder); + +/** @var ReflectionClass $class */ +$class = $arr[\Symfony\Component\String\LazyString::class]; +echo str_replace(DIRECTORY_SEPARATOR, '/', $class->getFileName()); +?> +--EXPECTF-- +%s/tests/functional/fallback-dirs/vendor/symfony/string/LazyString.php