Example #1
0
 public function getDataFromModem()
 {
     $this->client->authorize();
     $httpResponse = $this->client->fetchDownstreamData();
     $this->client->unauthorize();
     return $httpResponse;
 }
Example #2
0
 public function testUnauthorize()
 {
     $expectedResponse = new Response(200, array(), 'you have been logged out');
     $this->httpClientMock->method('__call')->with('get', [$this->modemOptions['url'] . $this->modemOptions['logout_url'], ['cookies' => new CookieJar()]])->willReturn($expectedResponse);
     $success = $this->client->unauthorize();
     $this->assertTrue($success);
 }