url()) { return $this->collection(collect($courses)); } }); return $this; } public function failsToFetch(): self { Http::fake(function ($request) { if ('https://nami.dpsg.de/ica/rest/module/baustein' === $request->url()) { return $this->errorResponse('error'); } }); return $this; } }