|
@@ 70-85 (lines=16) @@
|
| 67 |
|
self::assertFalse($diff, "no changes expected."); |
| 68 |
|
} |
| 69 |
|
|
| 70 |
|
public function testFulltextIndex() |
| 71 |
|
{ |
| 72 |
|
$table = new Table('fulltext_index'); |
| 73 |
|
$table->addColumn('text', 'text'); |
| 74 |
|
$table->addIndex(array('text'), 'f_index'); |
| 75 |
|
$table->addOption('engine', 'MyISAM'); |
| 76 |
|
|
| 77 |
|
$index = $table->getIndex('f_index'); |
| 78 |
|
$index->addFlag('fulltext'); |
| 79 |
|
|
| 80 |
|
$this->_sm->dropAndCreateTable($table); |
| 81 |
|
|
| 82 |
|
$indexes = $this->_sm->listTableIndexes('fulltext_index'); |
| 83 |
|
self::assertArrayHasKey('f_index', $indexes); |
| 84 |
|
self::assertTrue($indexes['f_index']->hasFlag('fulltext')); |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
public function testSpatialIndex() |
| 88 |
|
{ |
|
@@ 87-102 (lines=16) @@
|
| 84 |
|
self::assertTrue($indexes['f_index']->hasFlag('fulltext')); |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
public function testSpatialIndex() |
| 88 |
|
{ |
| 89 |
|
$table = new Table('spatial_index'); |
| 90 |
|
$table->addColumn('point', 'point'); |
| 91 |
|
$table->addIndex(array('point'), 's_index'); |
| 92 |
|
$table->addOption('engine', 'MyISAM'); |
| 93 |
|
|
| 94 |
|
$index = $table->getIndex('s_index'); |
| 95 |
|
$index->addFlag('spatial'); |
| 96 |
|
|
| 97 |
|
$this->_sm->dropAndCreateTable($table); |
| 98 |
|
|
| 99 |
|
$indexes = $this->_sm->listTableIndexes('spatial_index'); |
| 100 |
|
self::assertArrayHasKey('s_index', $indexes); |
| 101 |
|
self::assertTrue($indexes['s_index']->hasFlag('spatial')); |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
/** |
| 105 |
|
* @group DBAL-400 |