Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Aug 15, 2023
1 parent dc36fc1 commit 90926d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"opis/closure": "^3.6",
"laravel/serializable-closure": "^1.0",
"orchestra/dusk-updater": "^1.7.1 || ^2.2.1",
"orchestra/testbench": "^6.30",
"orchestra/testbench": "^6.31",
"php-webdriver/webdriver": "^1.9"
},
"require-dev": {
Expand Down
8 changes: 7 additions & 1 deletion laravel/bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
* @return \Illuminate\Foundation\Application
*/
$createApp = function (string $workingPath) {
$config = Config::loadFromYaml($workingPath);
$config = Config::loadFromYaml(
defined('TESTBENCH_WORKING_PATH') ? TESTBENCH_WORKING_PATH : $workingPath
);

$hasEnvironmentFile = file_exists("{$workingPath}/.env");

Expand All @@ -32,6 +34,10 @@ function ($app) use ($config, $hasEnvironmentFile) {
);
};

if (! defined('TESTBENCH_WORKING_PATH') && ! is_null(Env::get('TESTBENCH_WORKING_PATH'))) {
define('TESTBENCH_WORKING_PATH', Env::get('TESTBENCH_WORKING_PATH'));
}

$app = $createApp(realpath(__DIR__.'/../'));

unset($createApp);
Expand Down

0 comments on commit 90926d9

Please sign in to comment.