index() public method

Creates a index
public index ( string $property, string $type, string $class = null ) : Query
$property string
$type string
$class string
return Query
 public function testIndexCreate()
 {
     $binding = $this->createHttpBinding();
     $query = new Query();
     $query->index('index_name_2', 'unique');
     $result = $this->doQuery($query, $binding);
     $this->assertHttpStatus(200, $result);
     $body = $result->getData()->result[0];
     $this->assertSame(0, $body->value);
     $count = $this->getResultCount($binding->query('SELECT FROM Profile'));
     $query = new Query();
     $query->index('name', 'unique', 'Profile');
     $result = $this->doQuery($query, $binding);
     $this->assertHttpStatus(200, $result);
     $value = $result->getData()->result[0]->value;
     $this->assertEquals($value, $count);
 }