Example #1
0
 /**
  * @covers Paradox\Client::unloadCollection
  */
 public function testUnloadCollection()
 {
     $this->client->loadCollection($this->collectionName);
     //Verify it is loaded. Note that we list collections, because using getCollectionInfo() loads the collection.
     $collectionInfo = $this->client->listCollections(true, true);
     //Status 3 = loaded
     $this->assertEquals(3, $collectionInfo[$this->collectionName]['status'], "The collection was not loaded");
     //Unload the collection
     $this->client->unloadCollection($this->collectionName);
     //Verify it is unloaded. Note that we list collections, because using getCollectionInfo() loads the collection.
     $collectionInfo = $this->client->listCollections(true, true);
     //Status 2 = unloaded
     //Status 4 = in process of being unloaded
     $this->assertContains($collectionInfo[$this->collectionName]['status'], array(2, 4), "The collection was not unloaded");
 }