Пример #1
0
 public function testSysInfoHealth()
 {
     $serverUrl = 'http://host.com/';
     $aerogear = new AeroGearPush($serverUrl);
     $request = new GetSysInfoHealthRequest();
     $request->setOAuthToken(uniqid());
     $aerogear->sysInfoHealth($request);
 }
 public function testGetSysInfoHealthRequest()
 {
     $request = new GetSysInfoHealthRequest();
     $bearer = uniqid();
     $request->setHeader('Authorization', 'Bearer ' . $bearer);
     $this->assertEquals('Bearer ' . $bearer, $request->headers['headers']['Authorization']);
     $this->assertTrue(empty($request->OAuthToken));
     $oAuthToken = uniqid();
     $request->setOAuthToken($oAuthToken);
     $this->assertEquals($oAuthToken, $request->OAuthToken);
     $this->assertEquals('sys/info/health', $request->endpoint);
     $this->assertEquals('GET', $request->method);
 }