From 7f23741fd7d86ac7f602b8e328c31db11b70559c Mon Sep 17 00:00:00 2001 From: Hayden Pierce Date: Sat, 4 Aug 2018 11:03:21 -0500 Subject: [PATCH] Use correct path that composer will install. --- src/ClassFinder.php | 2 +- test/app1/src/ClassFinderTest.php | 2 +- test/bootstrap.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ClassFinder.php b/src/ClassFinder.php index 31fce92..3646ef2 100644 --- a/src/ClassFinder.php +++ b/src/ClassFinder.php @@ -15,7 +15,7 @@ class ClassFinder } $workingDirectory = str_replace('\\', '/', __DIR__); - $workingDirectory = str_replace('/vendor/haydenpierce/src', '', $workingDirectory); + $workingDirectory = str_replace('/vendor/haydenpierce/class-finder/src', '', $workingDirectory); $directoryPathPieces = explode('/', $workingDirectory); $appRoot = null; diff --git a/test/app1/src/ClassFinderTest.php b/test/app1/src/ClassFinderTest.php index 7e1b0ae..45e2c3d 100644 --- a/test/app1/src/ClassFinderTest.php +++ b/test/app1/src/ClassFinderTest.php @@ -3,7 +3,7 @@ namespace TestApp1; require_once __DIR__ . '/../vendor/autoload.php'; -require_once __DIR__ . '/../vendor/haydenpierce/src/ClassFinder.php'; +require_once __DIR__ . '/../vendor/haydenpierce/class-finder/src/ClassFinder.php'; use HaydenPierce\ClassFinder\ClassFinder; use \PHPUnit\Framework\TestCase; diff --git a/test/bootstrap.php b/test/bootstrap.php index 6247cf4..4606da2 100644 --- a/test/bootstrap.php +++ b/test/bootstrap.php @@ -48,7 +48,7 @@ function deleteDir($dirPath) { // https://stackoverflow.com/a/2050909/3000068 function recurse_copy($src,$dst) { $dir = opendir($src); - @mkdir($dst); + @mkdir($dst, 0777, true); while(false !== ( $file = readdir($dir)) ) { if (( $file != '.' ) && ( $file != '..' )) { if ( is_dir($src . '/' . $file) ) { @@ -64,7 +64,7 @@ function recurse_copy($src,$dst) { function copyInCurrentClasses($testApp) { $classFinderSource = realpath(__DIR__ . '/../src'); - $classFinderPath = $testApp . '/vendor/haydenpierce/src'; + $classFinderPath = $testApp . '/vendor/haydenpierce/class-finder/src'; $classFinderPath = str_replace('\\', '/', $classFinderPath); if (is_dir($classFinderPath)) { @@ -74,7 +74,7 @@ function copyInCurrentClasses($testApp) { recurse_copy($classFinderSource, $classFinderPath); $composerSource = realpath(__DIR__ . '/../composer.json'); - $composerPath = $testApp . '/vendor/haydenpierce/composer.json'; + $composerPath = $testApp . '/vendor/haydenpierce/class-finder/composer.json'; copy($composerSource, $composerPath); }