mirror of
https://github.com/danog/class-finder.git
synced 2024-11-30 04:29:03 +01:00
Use correct path that composer will install.
This commit is contained in:
parent
dfb8db82e0
commit
7f23741fd7
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user