You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'sql' => 'SELECT t0.id AS id_1, t0.locale AS locale_2, t0.field AS field_3, t0.content AS content_4, t0.object_id AS object_id_5 FROM article_translations t0 WHERE t0.object_id = ?',
'sql' => 'SELECT t0.id AS id_1, t0.locale AS locale_2, t0.field AS field_3, t0.content AS content_4, t0.object_id AS object_id_5 FROM article_translations t0 WHERE t0.object_id = ?',
static::assertSame('SELECT t0.id AS id_1, t0.locale AS locale_2, t0.field AS field_3, t0.content AS content_4, t0.object_id AS object_id_5 FROM article_translations t0 WHERE t0.object_id = 1', $sqlQueriesExecuted[1]);
@@ -193,24 +199,7 @@ public function testShouldFindFromIdentityMap(): void
193
199
194
200
// TODO: Remove the "if" check and "else" body when dropping support of doctrine/dbal 2.
static::assertCount(3, $sqlQueriesExecuted); // one update, transaction start - commit
228
244
static::assertSame("UPDATE article_translations SET content = 'change lt' WHERE id = 1", $sqlQueriesExecuted[1]);
@@ -241,14 +257,7 @@ public function testShouldBeAbleToUseTranslationQueryHint(): void
241
257
242
258
// TODO: Remove the "if" check and "else" body when dropping support of doctrine/dbal 2.
243
259
if (class_exists(Middleware::class)) {
244
-
$this->queryLogger
245
-
->expects(static::exactly(1))
246
-
->method('debug')
247
-
->withConsecutive(
248
-
['Executing query: {sql}', [
249
-
'sql' => "SELECT CAST(t1_.content AS VARCHAR(128)) AS title_0 FROM Article a0_ LEFT JOIN article_translations t1_ ON t1_.locale = 'lt' AND t1_.field = 'title' AND t1_.object_id = a0_.id",
250
-
]]
251
-
);
260
+
$this->queryLogger->reset();
252
261
} else {
253
262
$this->startQueryLog();
254
263
}
@@ -258,8 +267,17 @@ public function testShouldBeAbleToUseTranslationQueryHint(): void
258
267
static::assertCount(1, $result);
259
268
static::assertSame('lt', $result[0]['title']);
260
269
261
-
// TODO: Remove the "if" block when dropping support of doctrine/dbal 2.
262
-
if (!class_exists(Middleware::class)) {
270
+
// TODO: Remove the "if" check and "else" body when dropping support of doctrine/dbal 2.
'sql' => "SELECT CAST(t1_.content AS VARCHAR(128)) AS title_0 FROM Article a0_ LEFT JOIN article_translations t1_ ON t1_.locale = 'lt' AND t1_.field = 'title' AND t1_.object_id = a0_.id",
static::assertSame("SELECT CAST(t1_.content AS VARCHAR(128)) AS title_0 FROM Article a0_ LEFT JOIN article_translations t1_ ON t1_.locale = 'lt' AND t1_.field = 'title' AND t1_.object_id = a0_.id", $sqlQueriesExecuted[0]);
0 commit comments