1
0
mirror of https://github.com/danog/class-finder.git synced 2024-11-29 20:18:59 +01:00

Use correct path that composer will install.

This commit is contained in:
Hayden Pierce 2018-08-04 11:03:21 -05:00
parent dfb8db82e0
commit 7f23741fd7
3 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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);
}