/**
  * Get the parent categories for a datastore
  *
  * @param CobwebInfo\Cobra5Sdk\Entity\Datastore $datastore
  * @return array
  */
 protected function getParentCategoriesForDatastore(Datastore $datastore)
 {
     $categories = [];
     foreach ($datastore->roots() as $root) {
         $response = $this->cobra5->getCategory($root->id);
         foreach ($response as $category) {
             $categories[$category->id] = $category;
         }
     }
     return $categories;
 }
 /**
  * @expectedException TypeError
  */
 public function testAddDocumentOnlyAcceptsDocumentEntity()
 {
     $datastore = new Datastore();
     $datastore->addDocument('hello world');
 }