Skip to content

Commit 60898a5

Browse files
committed
Add assertion for value vs raw value representation queries against hooked properties.
1 parent 80845df commit 60898a5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/Tests/ORM/Functional/PropertyHooksTest.php

+10
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ public function testMapPropertyHooks(): void
4848
->getSingleScalarResult();
4949

5050
$this->assertEquals('en', $language, 'Selecting a field from DQL does not go through the property hook, accessing raw data.');
51+
52+
$this->_em->clear();
53+
54+
$user = $this->_em->getRepository(User::class)->findOneBy(['language' => 'EN']);
55+
56+
self::assertNull($user);
57+
58+
$user = $this->_em->getRepository(User::class)->findOneBy(['language' => 'en']);
59+
60+
self::assertNotNull($user);
5161
}
5262

5363
public function testTriggerLazyLoadingWhenAccessingPropertyHooks(): void

0 commit comments

Comments
 (0)