Non-empty composite key identifiers should also be supported
This commit is contained in:
parent
549bfe127c
commit
29d9f344e8
@ -393,17 +393,23 @@ class UnitOfWorkTest extends OrmTestCase
|
||||
|
||||
$nonEmptyString = new EntityWithStringIdentifier();
|
||||
|
||||
$nonEmptyString->id = uniqid('', true);
|
||||
$nonEmptyString->id = uniqid('id', true);
|
||||
|
||||
$emptyStrings = new EntityWithCompositeStringIdentifier();
|
||||
|
||||
$emptyStrings->id1 = '';
|
||||
$emptyStrings->id2 = '';
|
||||
|
||||
$nonEmptyStrings = new EntityWithCompositeStringIdentifier();
|
||||
|
||||
$nonEmptyStrings->id1 = uniqid('id1', true);
|
||||
$nonEmptyStrings->id2 = uniqid('id2', true);
|
||||
|
||||
return [
|
||||
'empty string, single field' => [$emptyString, ''],
|
||||
'non-empty string, single field' => [$nonEmptyString, $nonEmptyString->id],
|
||||
'empty strings, two fields' => [$emptyStrings, ' '],
|
||||
'non-empty strings, two fields' => [$nonEmptyStrings, $nonEmptyStrings->id1 . ' ' . $nonEmptyStrings->id2],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user