Skip to content

Commit

Permalink
Merge branch '7.x' into 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
crynobone committed Mar 3, 2025
2 parents 6ef638a + 6226fc5 commit f6040ea
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Attributes/UsesVendor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
namespace Orchestra\Testbench\Attributes;

use Attribute;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Facade;
use Orchestra\Testbench\Contracts\Attributes\AfterEach as AfterEachContract;
use Orchestra\Testbench\Contracts\Attributes\BeforeEach as BeforeEachContract;
use Orchestra\Testbench\Foundation\Actions\DeleteVendorSymlink;
use Orchestra\Testbench\Foundation\Application;
use Orchestra\Testbench\Foundation\Application as Testbench;

use function Orchestra\Testbench\package_path;

Expand All @@ -26,9 +28,14 @@ final class UsesVendor implements AfterEachContract, BeforeEachContract
*/
public function beforeEach($app): void
{
$laravel = Application::createVendorSymlink(base_path(), package_path('vendor'));
$laravel = Testbench::createVendorSymlink(base_path(), package_path('vendor'));

$this->vendorSymlinkCreated = $laravel['TESTBENCH_VENDOR_SYMLINK'] ?? false;

Facade::clearResolvedInstances();
Facade::setFacadeApplication($app);

Application::setInstance($app);
}

/**
Expand Down

0 comments on commit f6040ea

Please sign in to comment.