File tree 2 files changed +19
-7
lines changed
2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ public function getScope()
229
229
}
230
230
231
231
/**
232
- * Returns true if the set API version is greate than v4
232
+ * Returns true if the set API version is greater than v4
233
233
*
234
234
* @return bool
235
235
*/
Original file line number Diff line number Diff line change @@ -11,6 +11,20 @@ public function testCanCreateClassWithMinimumOptions()
11
11
{
12
12
$ twitchApi = new TwitchApi (['client_id ' => 'CLIENT-ID ' ]);
13
13
$ this ->assertInstanceOf (TwitchApi::class, $ twitchApi );
14
+
15
+ return $ twitchApi ;
16
+ }
17
+
18
+ /**
19
+ * @depends testCanCreateClassWithMinimumOptions
20
+ */
21
+ public function testCanSetClientId (TwitchApi $ twitchApi )
22
+ {
23
+ $ options = [
24
+ 'client_id ' => 'TEST_CLIENT_ID ' ,
25
+ ];
26
+ $ twitchApi ->setClientId ($ options ['client_id ' ]);
27
+ $ this ->assertEquals ($ twitchApi ->getClientId (), $ options ['client_id ' ]);
14
28
}
15
29
16
30
public function testCreateClassWithoutClientIdThrowsException ()
@@ -46,13 +60,11 @@ public function testCanCreateClassWithValidOptions()
46
60
$ this ->assertEquals ($ twitchApi ->getScope (), $ options ['scope ' ]);
47
61
}
48
62
49
- public function testApiVersionDefaultsTo5IfNotSpecificallySet ()
63
+ /**
64
+ * @depends testCanCreateClassWithMinimumOptions
65
+ */
66
+ public function testApiVersionDefaultsTo5IfNotSpecificallySet (TwitchApi $ twitchApi )
50
67
{
51
- $ options = [
52
- 'client_id ' => 'CLIENT_ID ' ,
53
- 'api_version ' => 5 ,
54
- ];
55
- $ twitchApi = new TwitchApi ($ options );
56
68
$ this ->assertEquals ($ twitchApi ->getApiVersion (), 5 );
57
69
}
58
70
You can’t perform that action at this time.
0 commit comments