diff --git a/tests/TestCase/Database/QueryTest.php b/tests/TestCase/Database/QueryTest.php index e60321174cf..2744dc866fd 100644 --- a/tests/TestCase/Database/QueryTest.php +++ b/tests/TestCase/Database/QueryTest.php @@ -2841,7 +2841,6 @@ public function testUpdateSetCallable() */ public function testUpdateStripAliasesFromConditions() { - $this->loadFixtures('Authors'); $query = new Query($this->connection); $query @@ -2854,14 +2853,21 @@ public function testUpdateStripAliasesFromConditions() 'b.name NOT IN' => ['foo', 'bar'], 'OR' => [ $query->newExpr()->eq(new IdentifierExpression('c.name'), 'zap'), - 'd.name' => 'baz' + 'd.name' => 'baz', + (new Query($this->connection))->select(['e.name'])->where(['e.name' => 'oof']) ] ] ], ]); $this->assertQuotedQuery( - 'UPDATE SET = :c0 WHERE \( = :c1 OR \( not in \(:c2,:c3\) AND \(\(\.\) = :c4 OR = :c5\)\)\)', + 'UPDATE SET = :c0 WHERE \(' . + ' = :c1 OR \(' . + ' not in \(:c2,:c3\) AND \(' . + '\(\.\) = :c4 OR = :c5 OR \(SELECT \. WHERE \. = :c6\)' . + '\)' . + '\)' . + '\)', $query->sql(), !$this->autoQuote );