From fe8e8509fc99c84006f53e41b18d7dbeab2045be Mon Sep 17 00:00:00 2001 From: Luca Patera Date: Sat, 23 Sep 2023 17:03:48 +0200 Subject: [PATCH] Fix test --- tests/Feature/ValidateWebAppDataTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Feature/ValidateWebAppDataTest.php b/tests/Feature/ValidateWebAppDataTest.php index e368571..b5156e2 100644 --- a/tests/Feature/ValidateWebAppDataTest.php +++ b/tests/Feature/ValidateWebAppDataTest.php @@ -12,6 +12,7 @@ /** @var FakeNutgram $bot */ $this->bot = app(Nutgram::class); $this->request = new Request(); + $this->app->bind('request', fn () => $this->request); }); it('validates web app data', function () { @@ -25,7 +26,7 @@ $middleware = new ValidateWebAppData($this->bot); $middleware->handle($this->request, function ($request) { expect($request->get('webAppData'))->toBeInstanceOf(WebAppData::class); - expect(webAppData()); + expect(webAppData())->toBeInstanceOf(WebAppData::class); }); });