indexes() public method

Return all indexes of a table
public indexes ( string $table_name ) : array
$table_name string the table name
return array
 /**
  * test if we can list indexes
  */
 public function test_can_list_indexes()
 {
     $this->adapter->execute_ddl('DROP TABLE IF EXISTS "animals"');
     $this->adapter->execute_ddl("CREATE TABLE animals (id serial primary key, name varchar(32))");
     $this->adapter->execute_ddl("CREATE INDEX idx_animals_on_name ON animals(name)");
     $indexes = $this->adapter->indexes('animals');
     $length = count($indexes);
     $this->assertEquals(1, $length);
     $this->adapter->execute_ddl('DROP TABLE IF EXISTS "animals"');
 }