File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,9 +12,7 @@ class OrgManagerTest extends \PHPUnit_Framework_TestCase
1212
1313 public function setUp ()
1414 {
15- $ client = new Client ();
16-
17- $ this ->orgmanager = new OrgManager ($ client );
15+ $ this ->orgmanager = new OrgManager ();
1816
1917 parent ::setUp ();
2018 }
@@ -31,4 +29,21 @@ public function you_can_set_api_token()
3129 $ this ->orgmanager ->connect ('API_TOKEN ' );
3230 $ this ->assertEquals ('API_TOKEN ' , $ this ->orgmanager ->apiToken );
3331 }
32+
33+ /** @test */
34+ public function you_can_get_client ()
35+ {
36+ $ this ->assertEquals ($ this ->orgmanager ->getClient (), $ this ->orgmanager ->client );
37+ $ this ->assertInstanceOf (Client::class, $ this ->orgmanager ->getClient ());
38+ }
39+
40+ /** @test */
41+ public function you_can_set_client ()
42+ {
43+ $ newClient = new Client ;
44+ $ this ->assertInstanceOf (Client::class, $ newClient );
45+ $ this ->assertNotEquals ($ this ->orgmanager ->client , $ newClient )
46+ $ this ->orgmanager ->setClient ($ newClient );
47+ $ this ->assertEquals ($ newClient , $ this ->orgmanager ->client );
48+ }
3449}
You can’t perform that action at this time.
0 commit comments