/**
  * @param $key
  * @throws SpreadsheetNotFoundException
  * @return \ZendGData\Spreadsheets\WorksheetEntry
  */
 protected function getDocument($key)
 {
     $query = new DocumentQuery();
     $query->setSpreadsheetKey($key);
     $feed = $this->getSpreadsheets()->getWorksheetFeed($query);
     if (!isset($feed[0])) {
         throw new SpreadsheetNotFoundException("Failed to find spreadsheet {$key}");
     }
     return $feed[0];
 }
 public function testGetWorksheetEntry()
 {
     $query = new Spreadsheets\DocumentQuery();
     $query->setSpreadsheetKey($this->sprKey);
     $query->setWorksheetId($this->wksId);
     $entry = $this->gdata->getWorksheetEntry($query);
     $this->assertTrue($entry instanceof Spreadsheets\WorksheetEntry);
     $entry = $this->gdata->getWorksheetEntry($query->getQueryUrl());
     $this->assertTrue($entry instanceof Spreadsheets\WorksheetEntry);
 }