public function getDataFromModem() { $this->client->authorize(); $httpResponse = $this->client->fetchDownstreamData(); $this->client->unauthorize(); return $httpResponse; }
public function testFetchDownstreamData() { $response = new Response(200, array(), 'some data to parse'); $this->httpClientMock->expects($this->any())->method('__call')->with('get', [$this->modemOptions['url'] . $this->modemOptions['data_url'], ['cookies' => new CookieJar()]])->willReturn($response); $data = $this->client->fetchDownstreamData(); $this->assertEquals('some data to parse', $data); }