Example #1
0
 public function testGetSingleServiceHelper()
 {
     $stubLocalDataResponse = $this->getMock('\\SWCO\\AppNexusAPI\\Tests\\LocalDataResponse');
     $stubLocalDataResponse->expects($this->once())->method('json')->will($this->returnValue($this->getData('category6')));
     $stubLocalDataRequest = $this->getMock('\\SWCO\\AppNexusAPI\\Tests\\LocalDataRequest');
     $stubLocalDataRequest->expects($this->once())->method('send')->will($this->returnValue($stubLocalDataResponse));
     $stubLocalDataClient = $this->getMock('\\SWCO\\AppNexusAPI\\Tests\\LocalDataClient');
     $stubLocalDataClient->expects($this->once())->method('get')->will($this->returnValue($stubLocalDataRequest));
     $request = new Request('username', 'password', 'token', null, $stubLocalDataClient);
     $response = $request->getCategory(6);
     $this->assertInstanceOf('\\SWCO\\AppNexusAPI\\Services\\Category', $response);
 }