diff --git a/tests/TestCase/ORM/Association/BelongsToManyTest.php b/tests/TestCase/ORM/Association/BelongsToManyTest.php index 9c88fa5db28..9005c4c2d41 100644 --- a/tests/TestCase/ORM/Association/BelongsToManyTest.php +++ b/tests/TestCase/ORM/Association/BelongsToManyTest.php @@ -993,7 +993,7 @@ public function testEagerLoadingBelongsToManyLimitedFieldsWithAutoFields() $result = $table ->find() ->contain(['Tags' => function ($q) { - return $q->select(['two' => '1 + 1'])->autoFields(true); + return $q->select(['two' => $q->newExpr('1 + 1')])->autoFields(true); }]) ->first();