From 876f76336953c495523f6d3aff094b8789c5c679 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Sun, 27 Oct 2019 18:41:56 +0000 Subject: [PATCH] =?UTF-8?q?Mock=20Codebird=20so=20we=20don=E2=80=99t=20nee?= =?UTF-8?q?d=20to=20pass=20tokens=20to=20travis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/Feature/LikesTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Feature/LikesTest.php b/tests/Feature/LikesTest.php index 4f66da87..4435f4c0 100644 --- a/tests/Feature/LikesTest.php +++ b/tests/Feature/LikesTest.php @@ -194,6 +194,17 @@ END; $client = new Client(['handler' => $handler]); $this->app->bind(Client::class, $client); + $info = new stdClass(); + $info->author_name = 'Jonny Barnes'; + $info->author_url = 'https://twitter.com/jonnybarnes'; + $info->html = '
HTML of the tweet embed
'; + $codebirdMock = $this->getMockBuilder(Codebird::class) + ->addMethods(['statuses_oembed']) + ->getMock(); + $codebirdMock->method('statuses_oembed') + ->willReturn($info); + $this->app->instance(Codebird::class, $codebirdMock); + $authorship = new Authorship(); $job->handle($client, $authorship);