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