Skip to content

Commit

Permalink
Configure testing environment
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 8, 2023
1 parent a416e59 commit 6ba1ce7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 7 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@

abstract class TestCase extends BaseTestCase
{
//
protected function setUp(): void
{
parent::setUp();

putenv('HYDE_WORKING_DIR=/path/to/working/dir');
putenv('HYDE_TEMP_DIR=/path/to/temp/dir');
}
}
3 changes: 0 additions & 3 deletions tests/Unit/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
use App\Application;
use Hyde\Foundation\Application as HydeApplication;

const HYDE_WORKING_DIR = '/path/to/working/dir';
const HYDE_TEMP_DIR = '/path/to/temp/dir';

test('custom application extends Hyde application', function () {
expect(new Application())->toBeInstanceOf(HydeApplication::class);
});
Expand Down
3 changes: 0 additions & 3 deletions tests/Unit/BootstrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Foundation\Exceptions\Handler;

putenv('HYDE_WORKING_DIR=/path/to/working/dir');
putenv('HYDE_TEMP_DIR=/path/to/temp/dir');

beforeEach(function () {
$this->app = require __DIR__.'/../../app/bootstrap.php';
});
Expand Down

0 comments on commit 6ba1ce7

Please sign in to comment.