Пример #1
0
 public function testGDataVersionHeaderSentWhenUsingV2X()
 {
     $this->adapter->setResponse(array('HTTP/1.1 200 OK\\r\\n\\r\\n'));
     $this->service->setMajorProtocolVersion(2);
     $this->service->setMinorProtocolVersion(1);
     $this->service->get('http://www.example.com');
     $headers = $this->adapter->popRequest()->headers;
     $found = false;
     foreach ($headers as $header => $value) {
         if ($header == 'GData-Version' && $value == 2) {
             $found = true;
         }
     }
     $this->assertTrue($found, 'Version header not found or incorrect');
 }