/**
  *
  */
 public function tearDown()
 {
     $collectionName = 'ArangoDB-PHP-Core-CollectionTestSuite-Collection';
     $collection = new Collection($this->client);
     /** @var $responseObject HttpResponse */
     $collection->drop($collectionName);
 }
 /**
  *
  */
 public function tearDown()
 {
     $batchParts = [];
     foreach ($this->collectionNames as $collectionName) {
         $collection = new Collection($this->client);
         /** @var $responseObject HttpResponse */
         $batchParts[] = $collection->drop($collectionName, ['isBatchPart' => true]);
     }
     $batch = new Batch($this->client);
     $batch->send($this->client, $batchParts);
 }
 /**
  * @throws ClientException
  */
 public function tearDown()
 {
     $collectionName = 'ArangoDB-PHP-Core-CollectionTestSuite-Collection';
     $collectionOptions = ["waitForSync" => true];
     $options = $collectionOptions;
     $this->client->bind('Request', function () {
         $request = $this->client->getRequest();
         return $request;
     });
     $request = $this->client->make('Request');
     $request->options = $options;
     $request->path = $this->client->fullDatabasePath . self::API_COLLECTION . '/' . $collectionName;
     $request->method = self::METHOD_DELETE;
     /** @var HttpResponse $responseObject */
     $responseObject = $request->send();
     $body = $responseObject->body;
     $this->assertArrayHasKey('code', json_decode($body, true));
     $decodedJsonBody = json_decode($body, true);
     $this->assertEquals(200, $decodedJsonBody['code']);
     $collectionName = 'ArangoDB-PHP-Core-CollectionTestSuite-NonExistingCollection';
     $collection = new Collection($this->client);
     /** @var $responseObject HttpResponse */
     $collection->drop($collectionName);
 }
 /**
  *
  */
 public function tearDown()
 {
     $batchParts = [];
     foreach ($this->collectionNames as $collectionName) {
         $collection = new Collection($this->client);
         /** @var $responseObject HttpResponse */
         $batchParts[] = $collection->drop($collectionName, ['isBatchPart' => true]);
     }
     $responseObject = Batch::send($this->client, $batchParts);
     static::assertEquals(200, $responseObject->status);
 }
    /**
     *
     */
    public function testDeleteCollection()
    {
        $deleteCollectionResponse = <<<TAG
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8

{
  "id" : "1398937424",
  "error" : false,
  "code" : 200
}
TAG;
        $options = ['waitForSync' => true];
        $this->connector->method('request')->willReturn($deleteCollectionResponse);
        $object = new Collection($this->client);
        /** @var $responseObject HttpResponse */
        $response = $object->drop($this->collectionNames[0], $options);
        $this->assertInstanceOf('\\frankmayer\\ArangoDbPhpCore\\Protocols\\Http\\HttpResponse', $response);
        $this->assertEquals(200, $response->status);
    }