Skip to content

Commit 5b7a340

Browse files
committed
Fix ParserResultSerializationTest by forcing the parser to produce a ParserResult of the old kind (with the executor already constructed)
1 parent c098fbc commit 5b7a340

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/Doctrine/Tests/ORM/Functional/ParserResultSerializationTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ public function testItSerializesParserResultWithAForwardCompatibleFormat(): void
7575
$query = $this->_em
7676
->createQuery('SELECT u FROM Doctrine\Tests\Models\Company\CompanyEmployee u WHERE u.name = :name');
7777

78+
// Use the (legacy) SqlWalker which directly puts an SqlExecutor instance into the parser result
79+
$query->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, Query\SqlWalker::class);
80+
7881
$parserResult = self::parseQuery($query);
7982
$serialized = serialize($parserResult);
8083
$this->assertStringNotContainsString(

0 commit comments

Comments
 (0)