-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathUserTest.php
More file actions
104 lines (87 loc) · 2.08 KB
/
Copy pathUserTest.php
File metadata and controls
104 lines (87 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
namespace Coderjerk\Tests;
use Coderjerk\BirdElephant\User;
use Coderjerk\BirdElephant\Users\Lists;
use GuzzleHttp\Exception\GuzzleException;
class UserTest extends BaseTest
{
protected array $credentials;
protected string $username;
protected User $user;
protected function setUp(): void
{
parent::setUp();
$this->credentials = $this->setUpCredentials();
$this->username = 'coderjerk';
$this->user = new User($this->credentials, $this->username);
}
public function testFollowing()
{
$case = $this->user->following();
$this->assertIsArray($case->data);
}
public function testTweets()
{
$case = $this->user->tweets();
$this->assertIsArray($case->data);
}
/**
* @throws GuzzleException
*/
public function testGet()
{
$case = $this->user->get();
$this->assertIsObject($case->data);
}
/**
* @throws GuzzleException
*/
public function testLikes()
{
$case = $this->user->likes();
$this->assertIsArray($case->data);
}
public function testLists()
{
$lists = $this->user->lists();
$this->assertInstanceOf(Lists::class, $lists);
}
/**
* @throws GuzzleException
*/
public function testBlocks()
{
$case = $this->user->blocks();
$this->assertIsArray($case->data);
}
/**
* @throws GuzzleException
*/
public function testMentions()
{
$case = $this->user->mentions();
$this->assertIsArray($case->data);
}
/**
* @throws GuzzleException
*/
public function testFollow()
{
$user = 'dril';
$case = $this->user->follow($user);
$this->assertIsObject($case->data);
}
/**
* @throws GuzzleException
*/
public function testMutes()
{
$case = $this->user->mutes();
$this->assertIsArray($case->data);
}
public function testFollowers()
{
$case = $this->user->followers();
$this->assertIsArray($case->data);
}
}