Beispiel #1
0
 /**
  * @depends testInsertResource
  * 
  */
 public function testGetCollections()
 {
     $this->initContext();
     $collections = new RestoCollections($this->context, $this->admin, array('autoload' => true));
     $this->assertEquals('Example', $collections->getCollection('Example')->name);
     $colls = $collections->getCollections();
     $this->assertEquals('Example', $colls['Example']->name);
     $stats = $collections->getStatistics();
     $json = json_decode($collections->toJSON(false));
     $this->assertEquals('*', $json->synthesis->name);
     /*
      * TODO :   check for toXML function
      */
     $xml = $collections->toXML();
     /*
      * TODO :  chek feature collection
      */
     $featureCollection = $collections->search();
     $data = file_get_contents(dirname(__FILE__) . "/../data/Land.json");
     $data = json_decode($data, true);
     $this->assertEquals(true, $collections->create($data));
     $collections->remove('Land');
 }