Mock Codebird so we don’t need to pass tokens to travis
This commit is contained in:
parent
66242b2c38
commit
876f763369
1 changed files with 11 additions and 0 deletions
|
@ -194,6 +194,17 @@ END;
|
||||||
$client = new Client(['handler' => $handler]);
|
$client = new Client(['handler' => $handler]);
|
||||||
$this->app->bind(Client::class, $client);
|
$this->app->bind(Client::class, $client);
|
||||||
|
|
||||||
|
$info = new stdClass();
|
||||||
|
$info->author_name = 'Jonny Barnes';
|
||||||
|
$info->author_url = 'https://twitter.com/jonnybarnes';
|
||||||
|
$info->html = '<div>HTML of the tweet embed</div>';
|
||||||
|
$codebirdMock = $this->getMockBuilder(Codebird::class)
|
||||||
|
->addMethods(['statuses_oembed'])
|
||||||
|
->getMock();
|
||||||
|
$codebirdMock->method('statuses_oembed')
|
||||||
|
->willReturn($info);
|
||||||
|
$this->app->instance(Codebird::class, $codebirdMock);
|
||||||
|
|
||||||
$authorship = new Authorship();
|
$authorship = new Authorship();
|
||||||
|
|
||||||
$job->handle($client, $authorship);
|
$job->handle($client, $authorship);
|
||||||
|
|
Loading…
Add table
Reference in a new issue