Skip to content

Commit 1eb9c5e

Browse files
committed
Change method by which we configure the base_path
1 parent fa9021b commit 1eb9c5e

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

tests/BaseTest.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,21 @@ protected function getPackageProviders($app)
1818
];
1919
}
2020

21+
protected function setUp(): void
22+
{
23+
parent::setUp();
24+
25+
// By default base_path points to the TestBench directory,
26+
// but we need it to reference our app. Adding this link
27+
// will make it transparent.
28+
exec('ln -sf ' . __DIR__ . ' ' . base_path());
29+
}
30+
2131
protected function tearDown(): void
2232
{
2333
parent::tearDown();
2434

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

28-
protected function getBasePath()
29-
{
30-
// By default base_path points to the TestBench directory,
31-
// we want it to point to the root of our package.
32-
return dirname(__DIR__);
33-
}
34-
}
38+
}

0 commit comments

Comments
 (0)