Skip to content

Commit

Permalink
Don't use removed helper
Browse files Browse the repository at this point in the history
  • Loading branch information
mnabialek committed Sep 20, 2019
1 parent 7c5dc92 commit 905717a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Middleware/LaravelTestCss.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Closure;
use Illuminate\Contracts\Config\Repository as Config;
use Illuminate\Http\Response;
use Illuminate\Support\Str;

class LaravelTestCss
{
Expand Down Expand Up @@ -37,7 +38,7 @@ public function handle($request, Closure $next, $guard = null)
/** @var Response $response */
$response = $next($request);
if ($response instanceof Response && app()->runningUnitTests() &&
str_contains($response->headers->get('Content-Type'), 'text/html')) {
Str::contains($response->headers->get('Content-Type'), 'text/html')) {
$content = $response->getContent();
if (($head = mb_strpos($content, '</head>')) !== false) {
$response->setContent(mb_substr($content, 0, $head) .
Expand Down

0 comments on commit 905717a

Please sign in to comment.