Skip to content

Commit 253744e

Browse files
committed
fix tests
1 parent b89539d commit 253744e

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

resources/views/layouts/dashboard.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<ol class="breadcrumb">
7171
<li><a href="/basicinformation"><i class="fa fa-dashboard"></i> Home</a></li>
7272
<li class="active"><a href="{{ $page_url or '#'}}">{{ $page_title }}</a></li>
73-
{!! $archer or '' !!}
73+
{!! $archer ?? '' !!}
7474
</ol>
7575
</section>
7676

tests/TestCase.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,21 @@
77
abstract class TestCase extends BaseTestCase
88
{
99
use CreatesApplication;
10+
11+
protected function setUp(): void
12+
{
13+
$compiledPath = dirname(__DIR__) . '/storage/framework/testing-views';
14+
if (!is_dir($compiledPath)) {
15+
mkdir($compiledPath, 0777, true);
16+
}
17+
18+
// Ensure Laravel picks up the custom compiled path before the application boots.
19+
putenv('VIEW_COMPILED_PATH=' . $compiledPath);
20+
$_ENV['VIEW_COMPILED_PATH'] = $compiledPath;
21+
$_SERVER['VIEW_COMPILED_PATH'] = $compiledPath;
22+
23+
parent::setUp();
24+
25+
config(['view.compiled' => $compiledPath]);
26+
}
1027
}

0 commit comments

Comments
 (0)