Skip to content

Commit c6376c3

Browse files
authored
Merge pull request #19 from utxo-one/dev-Media
Withheld as array
2 parents d9dd9d4 + 839aa56 commit c6376c3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/Models/Tweet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function getSource(): ?string
4444
return (isset($this->data['source']) ? $this->data['source'] : null);
4545
}
4646

47-
public function isWithheld(): ?bool
47+
public function isWithheld(): ?array
4848
{
4949
return (isset($this->data['withheld']) ? $this->data['withheld'] : null);
5050
}

tests/Clients/TweetClientTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@ public function testGetTimeline(): void
3838
{
3939
$client = new TweetClient(bearerToken: $_ENV['TWITTER_BEARER_TOKEN']);
4040

41-
$response = $client->getTimeline('12', 10);
41+
$response = $client->getTimeline('1558929312547577858', 5);
4242

4343
$this->assertInstanceOf(Tweets::class, $response);
44-
$this->assertCount(10, $response->all());
44+
$this->assertCount(5, $response->all());
45+
46+
die(var_dump($response->all()[0]));
47+
4548
$this->assertTweetFieldsAreSet($response->all()[0]);
4649
}
4750

0 commit comments

Comments
 (0)