File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed
Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ public function getScope()
229229 }
230230
231231 /**
232- * Returns true if the set API version is greate than v4
232+ * Returns true if the set API version is greater than v4
233233 *
234234 * @return bool
235235 */
Original file line number Diff line number Diff line change @@ -11,6 +11,20 @@ public function testCanCreateClassWithMinimumOptions()
1111 {
1212 $ twitchApi = new TwitchApi (['client_id ' => 'CLIENT-ID ' ]);
1313 $ 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 ' ]);
1428 }
1529
1630 public function testCreateClassWithoutClientIdThrowsException ()
@@ -46,13 +60,11 @@ public function testCanCreateClassWithValidOptions()
4660 $ this ->assertEquals ($ twitchApi ->getScope (), $ options ['scope ' ]);
4761 }
4862
49- public function testApiVersionDefaultsTo5IfNotSpecificallySet ()
63+ /**
64+ * @depends testCanCreateClassWithMinimumOptions
65+ */
66+ public function testApiVersionDefaultsTo5IfNotSpecificallySet (TwitchApi $ twitchApi )
5067 {
51- $ options = [
52- 'client_id ' => 'CLIENT_ID ' ,
53- 'api_version ' => 5 ,
54- ];
55- $ twitchApi = new TwitchApi ($ options );
5668 $ this ->assertEquals ($ twitchApi ->getApiVersion (), 5 );
5769 }
5870
You can’t perform that action at this time.
0 commit comments