11<?php namespace tests ;
22
3- use Atomx \AccountStore ;
3+ use Atomx \TokenStore ;
44use Atomx \Exceptions \ApiException ;
55use Atomx \Exceptions \TotpRequiredException ;
6- use Atomx \LoginAccountStore ;
6+ use Atomx \LoginTokenStore ;
77use Atomx \Resources \Advertiser ;
8- use Atomx \Resources \Browsers ;
98use Atomx \Resources \Domain ;
109use Atomx \Resources \Login ;
1110use GuzzleHttp \Message \Response ;
1211use GuzzleHttp \Stream \Stream ;
1312use GuzzleHttp \Subscriber \History ;
1413use GuzzleHttp \Subscriber \Mock ;
1514
16- class TestAccountStore implements AccountStore {
15+ class TestTokenStore implements TokenStore {
1716 private $ token = 'TEST_TOKEN ' ;
1817
1918 public function getToken () { return $ this ->token ; }
@@ -23,7 +22,7 @@ public function getPassword() { return ''; }
2322 public function getApiBase () { return 'https://api.atomx.com/v3/ ' ; }
2423}
2524
26- class TestLoginAccountStore extends LoginAccountStore {
25+ class TestLoginTokenStore extends LoginTokenStore {
2726 private $ loginClient ;
2827 public function setLoginClient ($ client ) { $ this ->loginClient = $ client ; }
2928 protected function getLoginClient () { return $ this ->loginClient ; }
@@ -41,7 +40,7 @@ public function testTokenEndpointWithoutAS()
4140
4241 public function testDiscardInvalidToken ()
4342 {
44- $ store = new TestAccountStore ();
43+ $ store = new TestTokenStore ();
4544 $ advertiser = new Advertiser ($ store );
4645
4746 $ mock = new Mock ([
@@ -59,7 +58,7 @@ public function testDiscardInvalidToken()
5958
6059 public function testRequestWithoutLogin ()
6160 {
62- $ store = new TestAccountStore ();
61+ $ store = new TestTokenStore ();
6362 $ domain = new Domain ($ store );
6463
6564 $ history = new History ();
@@ -75,7 +74,7 @@ public function testRequestWithoutLogin()
7574
7675 public function testRequestWithAuthToken ()
7776 {
78- $ store = new TestAccountStore ();
77+ $ store = new TestTokenStore ();
7978 $ advertiser = new Advertiser ($ store );
8079
8180 $ history = new History ();
@@ -92,9 +91,9 @@ public function testRequestWithAuthToken()
9291
9392 public function testLogin ()
9493 {
95- $ login = new Login (new TestAccountStore );
94+ $ login = new Login (new TestTokenStore );
9695
97- $ store = new TestLoginAccountStore ();
96+ $ store = new TestLoginTokenStore ();
9897 $ store ->setLoginClient ($ login );
9998
10099 $ advertiser = new Advertiser ($ store );
@@ -122,9 +121,9 @@ public function testLogin()
122121
123122 public function testTotpAccountStore ()
124123 {
125- $ login = new Login (new TestAccountStore );
124+ $ login = new Login (new TestTokenStore );
126125
127- $ store = new TestLoginAccountStore ();
126+ $ store = new TestLoginTokenStore ();
128127 $ store ->setLoginClient ($ login );
129128
130129 $ advertiser = new Advertiser ($ store );
0 commit comments