@@ -10,22 +10,22 @@ class ClientTest extends \PHPUnit_Framework_TestCase
1010 public function __construct ()
1111 {
1212 $ this ->client = $ this ->getMockBuilder ('Databox\Client ' )
13- ->setMethods (['rawPush ' ])
13+ ->setMethods (['rawPush ' , ' rawGet ' ])
1414 ->getMock ();
1515 }
1616
1717 public function testClientCorrectOptions ()
1818 {
19- $ mimeType = 'application/json ' ;
19+ $ mimeType = 'application/json ' ;
2020 $ userAgent = 'databox-php ' ;
21- $ token = 'test-token ' ;
22- $ baseUrl = 'https://push2new.databox.com ' ;
21+ $ token = 'test-token ' ;
22+ $ baseUrl = 'https://push2new.databox.com ' ;
2323
2424 $ client = new Client ($ token );
2525 $ this ->assertEquals ($ mimeType , $ client ->getConfig ('headers ' )['Content-Type ' ]);
2626 $ this ->assertEquals ($ userAgent , substr ($ client ->getConfig ('headers ' )['User-Agent ' ], 0 , 11 ));
2727 $ this ->assertEquals ($ mimeType , $ client ->getConfig ('headers ' )['Accept ' ]);
28- $ this ->assertEquals ($ baseUrl , (string ) $ client ->getConfig ('base_uri ' ));
28+ $ this ->assertEquals ($ baseUrl , (string )$ client ->getConfig ('base_uri ' ));
2929 $ this ->assertEquals ($ token , $ client ->getConfig ('auth ' )[0 ]);
3030 }
3131
@@ -35,7 +35,7 @@ public function testRawPush()
3535 ->setMethods (['post ' ])
3636 ->getMock ();
3737
38- $ json = '{"status":"ok"} ' ;
38+ $ json = '{"status":"ok"} ' ;
3939 $ response = new Response (200 , [], $ json );
4040 $ client ->method ('post ' )->willReturn ($ response );
4141
@@ -44,7 +44,7 @@ public function testRawPush()
4444
4545 public function testLastPush ()
4646 {
47- $ this ->client ->method ('rawPush ' )->willReturn ([
47+ $ this ->client ->method ('rawGet ' )->willReturn ([
4848 [], []
4949 ]);
5050
0 commit comments