From e2279a0de8c2d0eb707a7d86d7ff48eba08ea1bc Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Sun, 9 Aug 2020 20:12:45 +0100 Subject: [PATCH] Fix like tests --- tests/Feature/LikesTest.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/Feature/LikesTest.php b/tests/Feature/LikesTest.php index a9da9f0b..8a3cdd7f 100644 --- a/tests/Feature/LikesTest.php +++ b/tests/Feature/LikesTest.php @@ -97,7 +97,9 @@ END; ]); $handler = HandlerStack::create($mock); $client = new Client(['handler' => $handler]); - $this->app->bind(Client::class, $client); + $this->app->bind(Client::class, function () use ($client) { + return $client; + }); $authorship = new Authorship(); $job->handle($client, $authorship); @@ -136,7 +138,9 @@ END; ]); $handler = HandlerStack::create($mock); $client = new Client(['handler' => $handler]); - $this->app->bind(Client::class, $client); + $this->app->bind(Client::class, function () use ($client) { + return $client; + }); $authorship = new Authorship(); $job->handle($client, $authorship); @@ -168,7 +172,9 @@ END; ]); $handler = HandlerStack::create($mock); $client = new Client(['handler' => $handler]); - $this->app->bind(Client::class, $client); + $this->app->bind(Client::class, function () use ($client) { + return $client; + }); $authorship = new Authorship(); $job->handle($client, $authorship); @@ -192,7 +198,9 @@ END; ]); $handler = HandlerStack::create($mock); $client = new Client(['handler' => $handler]); - $this->app->bind(Client::class, $client); + $this->app->bind(Client::class, function () use ($client) { + return $client; + }); $info = new stdClass(); $info->author_name = 'Jonny Barnes';