@@ 280-291 (lines=12) @@ | ||
277 | self::assertEquals('bar', $table->getOption('foo')); |
|
278 | } |
|
279 | ||
280 | public function testAddForeignKeyConstraintUnknownLocalColumnThrowsException() : void |
|
281 | { |
|
282 | $this->expectException(SchemaException::class); |
|
283 | ||
284 | $table = new Table('foo'); |
|
285 | $table->addColumn('id', 'integer'); |
|
286 | ||
287 | $foreignTable = new Table('bar'); |
|
288 | $foreignTable->addColumn('id', 'integer'); |
|
289 | ||
290 | $table->addForeignKeyConstraint($foreignTable, ['foo'], ['id']); |
|
291 | } |
|
292 | ||
293 | public function testAddForeignKeyConstraintUnknownForeignColumnThrowsException() : void |
|
294 | { |
|
@@ 293-304 (lines=12) @@ | ||
290 | $table->addForeignKeyConstraint($foreignTable, ['foo'], ['id']); |
|
291 | } |
|
292 | ||
293 | public function testAddForeignKeyConstraintUnknownForeignColumnThrowsException() : void |
|
294 | { |
|
295 | $this->expectException(SchemaException::class); |
|
296 | ||
297 | $table = new Table('foo'); |
|
298 | $table->addColumn('id', 'integer'); |
|
299 | ||
300 | $foreignTable = new Table('bar'); |
|
301 | $foreignTable->addColumn('id', 'integer'); |
|
302 | ||
303 | $table->addForeignKeyConstraint($foreignTable, ['id'], ['foo']); |
|
304 | } |
|
305 | ||
306 | public function testAddForeignKeyConstraint() : void |
|
307 | { |