Skip to content

Commit

Permalink
Improve Laravel compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
tontonsb committed Oct 21, 2023
1 parent d42afc2 commit 05ba5c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ protected function getPackageAliases($app): array
*/
protected function getEnvironmentSetUp($app): void
{
$app->instance('path.public', __DIR__.'/fixtures');
if (method_exists($app, 'usePublicPath')) // Laravel 10
$app->usePublicPath(__DIR__.'/fixtures');
else // Laravel 8 & Laravel 9
$app->instance('path.public', __DIR__.'/fixtures');
}

/**
Expand Down

0 comments on commit 05ba5c3

Please sign in to comment.