Example #1
0
 /**
  * @covers Paradox\Client::renameCollection
  */
 public function testRenameCollection()
 {
     $this->client->createCollection('mytestcollection');
     $this->client->renameCollection('mytestcollection', 'mytestcollection2');
     $collectionInfo = $this->client->getCollectionInfo('mytestcollection2');
     $this->assertInternalType('array', $collectionInfo, 'The collection info should be an array');
     $this->assertNotEmpty($collectionInfo, 'The collection info should not be empty');
     $this->client->deleteCollection('mytestcollection2');
     try {
         $graphInfo = $this->client->getCollectionInfo('mytestcollection2');
     } catch (\Exception $e) {
         $this->assertInstanceOf('Paradox\\exceptions\\CollectionManagerException', $e, 'Exception thrown was not a Paradox\\exceptions\\CollectionManagerException');
         return;
     }
     $this->fail("Tried to get info on a collection that does not exist, but no exception was thrown");
 }