/** * @throws ClientException */ public function setUp() { $connector = new Connector($this->client); $this->client = getClient($connector); $collectionName = 'ArangoDB-PHP-Core-CollectionTestSuite-Collection'; $collectionOptions = ['waitForSync' => true]; $collectionParameters = []; $options = $collectionOptions; $this->client->bind('Request', function () { return $this->client->getRequest(); }); $request = $this->client->make('Request'); $request->options = $options; $request->body = ['name' => $collectionName]; $request->body = self::array_merge_recursive_distinct($request->body, $collectionParameters); $request->body = json_encode($request->body); $request->path = $this->client->fullDatabasePath . self::API_COLLECTION; $request->method = self::METHOD_POST; $responseObject = $request->send(); $body = $responseObject->body; static::assertArrayHasKey('code', json_decode($body, true)); $decodedJsonBody = json_decode($body, true); static::assertEquals(200, $decodedJsonBody['code']); static::assertEquals($collectionName, $decodedJsonBody['name']); }
/** * */ public function setUp() { $this->connector = new Connector(); $this->client = getClient($this->connector); $this->collectionNames[0] = 'ArangoDB-PHP-Core-CollectionTestSuite-Collection-01'; $this->collectionNames[1] = 'ArangoDB-PHP-Core-CollectionTestSuite-Collection-02'; $this->collectionNames[2] = 'ArangoDB-PHP-Core-CollectionTestSuite-Collection-03'; }
/** * */ public function setUp() { $this->connector = new Connector(); $this->client = getClient($this->connector); $this->client->bind('Request', function () { return $this->client->getRequest(); }); }
public function setUp() { $this->connector = new Connector(); $this->client = getClient($this->connector); }