Skip to content

Commit

Permalink
Change method by which we configure the base_path
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondfrancis committed May 16, 2021
1 parent fa9021b commit 1eb9c5e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions tests/BaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,21 @@ protected function getPackageProviders($app)
];
}

protected function setUp(): void
{
parent::setUp();

// By default base_path points to the TestBench directory,
// but we need it to reference our app. Adding this link
// will make it transparent.
exec('ln -sf ' . __DIR__ . ' ' . base_path());
}

protected function tearDown(): void
{
parent::tearDown();

File::deleteDirectory(base_path('storage/framework/testing'));
}

protected function getBasePath()
{
// By default base_path points to the TestBench directory,
// we want it to point to the root of our package.
return dirname(__DIR__);
}
}
}

0 comments on commit 1eb9c5e

Please sign in to comment.