/** * @covers Paradox\Client::createHashIndex */ public function testCreateHashIndex() { $id = $this->client->createHashIndex($this->collectionName, 'myfield', true); $info = $this->client->getIndexInfo($this->collectionName, $id); $this->assertInternalType('array', $info, "The index we just created is missing"); $this->assertEquals("hash", $info['type'], 'The type of the created index should be "hash"'); $this->assertEquals('myfield', $info['fields'][0], "The field of the created index does not match"); $this->assertTrue($info['unique'], 'The unique of the create index should be "true"'); }