|
@@ 167-178 (lines=12) @@
|
| 164 |
|
$table->getIndex("unknownIndex"); |
| 165 |
|
} |
| 166 |
|
|
| 167 |
|
public function testAddTwoPrimaryThrowsException() |
| 168 |
|
{ |
| 169 |
|
$this->expectException("Doctrine\DBAL\Schema\SchemaException"); |
| 170 |
|
|
| 171 |
|
$type = \Doctrine\DBAL\Types\Type::getType('integer'); |
| 172 |
|
$columns = array(new Column("foo", $type), new Column("bar", $type)); |
| 173 |
|
$indexes = array( |
| 174 |
|
new Index("the_primary", array("foo"), true, true), |
| 175 |
|
new Index("other_primary", array("bar"), true, true), |
| 176 |
|
); |
| 177 |
|
$table = new Table("foo", $columns, $indexes, array()); |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
public function testAddTwoIndexesWithSameNameThrowsException() |
| 181 |
|
{ |
|
@@ 180-191 (lines=12) @@
|
| 177 |
|
$table = new Table("foo", $columns, $indexes, array()); |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
public function testAddTwoIndexesWithSameNameThrowsException() |
| 181 |
|
{ |
| 182 |
|
$this->expectException("Doctrine\DBAL\Schema\SchemaException"); |
| 183 |
|
|
| 184 |
|
$type = \Doctrine\DBAL\Types\Type::getType('integer'); |
| 185 |
|
$columns = array(new Column("foo", $type), new Column("bar", $type)); |
| 186 |
|
$indexes = array( |
| 187 |
|
new Index("an_idx", array("foo"), false, false), |
| 188 |
|
new Index("an_idx", array("bar"), false, false), |
| 189 |
|
); |
| 190 |
|
$table = new Table("foo", $columns, $indexes, array()); |
| 191 |
|
} |
| 192 |
|
|
| 193 |
|
public function testConstraints() |
| 194 |
|
{ |