From 29d9f344e88e9281345c799188919d5764c9217a Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Thu, 7 Jul 2016 19:35:39 +0200 Subject: [PATCH] Non-empty composite key identifiers should also be supported --- tests/Doctrine/Tests/ORM/UnitOfWorkTest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php b/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php index b0b38b9e2..6b5f63a6f 100644 --- a/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php +++ b/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php @@ -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], ]; } }