Jsor\Doctrine\PostGIS\Event\DBALSchemaEventSubscriberTest::testListTableIndexes PHP Method

testListTableIndexes() public method

    public function testListTableIndexes()
    {
        $indexes = $this->sm->listTableIndexes('points');
        $spatialIndexes = array('idx_27ba8e293be136c3', 'idx_27ba8e295f51a43c', 'idx_27ba8e295afbb72d', 'idx_27ba8e29b7a5f324', 'idx_27ba8e293c257075', 'idx_27ba8e2999674a3d', 'idx_27ba8e29cf3dedbb', 'idx_27ba8e29cf3dedbb', 'idx_27ba8e293d5fe69e', 'idx_27ba8e29b832b304');
        $nonSpatialIndexes = array('idx_text', 'idx_text_gist');
        foreach ($spatialIndexes as $spatialIndex) {
            $this->assertArrayHasKey($spatialIndex, $indexes);
            $this->assertTrue($indexes[$spatialIndex]->hasFlag('spatial'));
        }
        foreach ($nonSpatialIndexes as $nonSpatialIndex) {
            $this->assertArrayHasKey($nonSpatialIndex, $indexes);
            $this->assertFalse($indexes[$nonSpatialIndex]->hasFlag('spatial'));
        }
    }