diff --git a/src/Middleware/LaravelTestCss.php b/src/Middleware/LaravelTestCss.php index 60e0d06..30d6263 100644 --- a/src/Middleware/LaravelTestCss.php +++ b/src/Middleware/LaravelTestCss.php @@ -5,6 +5,7 @@ use Closure; use Illuminate\Contracts\Config\Repository as Config; use Illuminate\Http\Response; +use Illuminate\Support\Str; class LaravelTestCss { @@ -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, '')) !== false) { $response->setContent(mb_substr($content, 0, $head) .