sprKey = constant('TESTS_ZEND_GDATA_SPREADSHEETS_SPREADSHEETKEY'); $this->wksId = constant('TESTS_ZEND_GDATA_SPREADSHEETS_WORKSHEETID'); $service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME; $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service); $this->gdata = new Zend_Gdata_Spreadsheets($client); } public function testGetRawResponseBody() { try { $rowData = array(); $entry = $this->gdata->insertRow($rowData, $this->sprKey); $this->fail('Expecting Zend_Gdata_App_HttpException'); } catch (Zend_Gdata_App_HttpException $hExc) { $this->assertThat($hExc, $this->isInstanceOf('Zend_Gdata_App_HttpException'), 'Expecting Zend_Gdata_App_HttpException, got ' . get_class($hExc)); $message = $hExc->getMessage(); $this->assertEquals($message, 'Expected response code 200, got 400'); $body = $hExc->getRawResponseBody(); $this->assertNotNull($body); $this->assertNotEquals(stripos($body, 'Blank rows cannot be written; use delete instead.'), false); } } }