|
@@ 272-283 (lines=12) @@
|
| 269 |
|
$this->assertEquals("bar", $table->getOption("foo")); |
| 270 |
|
} |
| 271 |
|
|
| 272 |
|
public function testAddForeignKeyConstraint_UnknownLocalColumn_ThrowsException() |
| 273 |
|
{ |
| 274 |
|
$this->setExpectedException("Doctrine\DBAL\Schema\SchemaException"); |
| 275 |
|
|
| 276 |
|
$table = new Table("foo"); |
| 277 |
|
$table->addColumn("id", 'integer'); |
| 278 |
|
|
| 279 |
|
$foreignTable = new Table("bar"); |
| 280 |
|
$foreignTable->addColumn("id", 'integer'); |
| 281 |
|
|
| 282 |
|
$table->addForeignKeyConstraint($foreignTable, array("foo"), array("id")); |
| 283 |
|
} |
| 284 |
|
|
| 285 |
|
public function testAddForeignKeyConstraint_UnknownForeignColumn_ThrowsException() |
| 286 |
|
{ |
|
@@ 285-296 (lines=12) @@
|
| 282 |
|
$table->addForeignKeyConstraint($foreignTable, array("foo"), array("id")); |
| 283 |
|
} |
| 284 |
|
|
| 285 |
|
public function testAddForeignKeyConstraint_UnknownForeignColumn_ThrowsException() |
| 286 |
|
{ |
| 287 |
|
$this->setExpectedException("Doctrine\DBAL\Schema\SchemaException"); |
| 288 |
|
|
| 289 |
|
$table = new Table("foo"); |
| 290 |
|
$table->addColumn("id", 'integer'); |
| 291 |
|
|
| 292 |
|
$foreignTable = new Table("bar"); |
| 293 |
|
$foreignTable->addColumn("id", 'integer'); |
| 294 |
|
|
| 295 |
|
$table->addForeignKeyConstraint($foreignTable, array("id"), array("foo")); |
| 296 |
|
} |
| 297 |
|
|
| 298 |
|
public function testAddForeignKeyConstraint() |
| 299 |
|
{ |