mirror of
https://github.com/pestphp/pest.git
synced 2026-03-12 10:47:25 +01:00
Merge pull request #209 from NickSdot/make-root-path-working-in-subdirectory-structures
Get root path based on composer autoloader
This commit is contained in:
5
bin/pest
5
bin/pest
@ -19,13 +19,16 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||||||
|
|
||||||
if (file_exists($vendorPath)) {
|
if (file_exists($vendorPath)) {
|
||||||
include_once $vendorPath;
|
include_once $vendorPath;
|
||||||
|
$autoloadPath = $vendorPath;
|
||||||
} else {
|
} else {
|
||||||
include_once $localPath;
|
include_once $localPath;
|
||||||
|
$autoloadPath = $localPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
(new Provider())->register();
|
(new Provider())->register();
|
||||||
|
|
||||||
$rootPath = getcwd();
|
// get $rootPath based on $autoloadPath
|
||||||
|
$rootPath = dirname($autoloadPath, 2);
|
||||||
|
|
||||||
$testSuite = TestSuite::getInstance($rootPath);
|
$testSuite = TestSuite::getInstance($rootPath);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user