@@ 173-184 (lines=12) @@ | ||
170 | $table->getIndex('unknownIndex'); |
|
171 | } |
|
172 | ||
173 | public function testAddTwoPrimaryThrowsException() : void |
|
174 | { |
|
175 | $this->expectException(SchemaException::class); |
|
176 | ||
177 | $type = Type::getType('integer'); |
|
178 | $columns = [new Column('foo', $type), new Column('bar', $type)]; |
|
179 | $indexes = [ |
|
180 | new Index('the_primary', ['foo'], true, true), |
|
181 | new Index('other_primary', ['bar'], true, true), |
|
182 | ]; |
|
183 | $table = new Table('foo', $columns, $indexes, []); |
|
184 | } |
|
185 | ||
186 | public function testAddTwoIndexesWithSameNameThrowsException() : void |
|
187 | { |
|
@@ 186-197 (lines=12) @@ | ||
183 | $table = new Table('foo', $columns, $indexes, []); |
|
184 | } |
|
185 | ||
186 | public function testAddTwoIndexesWithSameNameThrowsException() : void |
|
187 | { |
|
188 | $this->expectException(SchemaException::class); |
|
189 | ||
190 | $type = Type::getType('integer'); |
|
191 | $columns = [new Column('foo', $type), new Column('bar', $type)]; |
|
192 | $indexes = [ |
|
193 | new Index('an_idx', ['foo'], false, false), |
|
194 | new Index('an_idx', ['bar'], false, false), |
|
195 | ]; |
|
196 | $table = new Table('foo', $columns, $indexes, []); |
|
197 | } |
|
198 | ||
199 | public function testConstraints() : void |
|
200 | { |