|
@@ 307-321 (lines=15) @@
|
| 304 |
|
/** |
| 305 |
|
* @group DDC-268 |
| 306 |
|
*/ |
| 307 |
|
public function testSetInvalidVersionMapping_ThrowsException() |
| 308 |
|
{ |
| 309 |
|
$cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext); |
| 310 |
|
$cm->setTable(new Mapping\TableMetadata('cms_users')); |
| 311 |
|
|
| 312 |
|
$property = new Mapping\VersionFieldMetadata('foo'); |
| 313 |
|
|
| 314 |
|
$property->setDeclaringClass($cm); |
| 315 |
|
$property->setColumnName('foo'); |
| 316 |
|
$property->setType(Type::getType('string')); |
| 317 |
|
|
| 318 |
|
$this->expectException(MappingException::class); |
| 319 |
|
|
| 320 |
|
$cm->addProperty($property); |
| 321 |
|
} |
| 322 |
|
|
| 323 |
|
public function testGetSingleIdentifierFieldName_MultipleIdentifierEntity_ThrowsException() |
| 324 |
|
{ |
|
@@ 489-502 (lines=14) @@
|
| 486 |
|
/** |
| 487 |
|
* @group DDC-1224 |
| 488 |
|
*/ |
| 489 |
|
public function testGetTemporaryTableNameSchema() |
| 490 |
|
{ |
| 491 |
|
$cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext); |
| 492 |
|
$cm->setTable(new Mapping\TableMetadata('cms_users')); |
| 493 |
|
|
| 494 |
|
$tableMetadata = new Mapping\TableMetadata(); |
| 495 |
|
|
| 496 |
|
$tableMetadata->setSchema('foo'); |
| 497 |
|
$tableMetadata->setName('bar'); |
| 498 |
|
|
| 499 |
|
$cm->setTable($tableMetadata); |
| 500 |
|
|
| 501 |
|
self::assertEquals('foo_bar_id_tmp', $cm->getTemporaryIdTableName()); |
| 502 |
|
} |
| 503 |
|
|
| 504 |
|
public function testDefaultTableName() |
| 505 |
|
{ |