Skip to content

Commit 5ee77f7

Browse files
N1ebieskinckg
authored andcommitted
Update MinifyResponse.php (#9)
Phpunit uses APP_ENV=testing by default. With !app()->isLocal(), laravel during tests minifies the response, which causes problems, for example, $response->assertViewIs does not work properly.
1 parent 3ebbe13 commit 5ee77f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Middleware/MinifyResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function handle($request, Closure $next)
2121
/** @var Response $response */
2222
$response = $next($request);
2323

24-
if (!app()->isLocal() && $this->isHtml($response)) {
24+
if (config('app.debug') === false && $this->isHtml($response)) {
2525
$response->setContent((new Minifier())->html($response->getContent()));
2626
}
2727

0 commit comments

Comments
 (0)