/**
  * 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;
 }
 public function testRootsMethodReturnsCollection()
 {
     $datastore = new Datastore();
     $this->assertInstanceOf('Illuminate\\Support\\Collection', $datastore->roots());
 }