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