Skip to content

Commit 35246f2

Browse files
committed
add failing test
1 parent 9ed4002 commit 35246f2

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Tests\Feature\Middleware;
6+
7+
use Illuminate\Support\Facades\Route;
8+
use Laravel\Boost\Middleware\InjectBoost;
9+
use Tests\TestCase;
10+
11+
class InjectBoostTest extends TestCase
12+
{
13+
public function test_it_maintains_the_original_view_response_type(): void
14+
{
15+
$this->app['view']->addNamespace('test', __DIR__.'/../../fixtures');
16+
17+
Route::get('injection-test', function () {
18+
return view('test::injection-test');
19+
})->middleware(InjectBoost::class);
20+
21+
$response = $this->get('injection-test');
22+
23+
$response->assertViewIs('test::injection-test');
24+
}
25+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<html>
2+
<head>
3+
<title>foo</title>
4+
</head>
5+
</html>

0 commit comments

Comments
 (0)