Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 1a52c2b

Browse files
committed
test(dbrunner): Adapt for new format
1 parent 05fc142 commit 1a52c2b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/Service/DbRunnerServiceTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function testCache(): void
2626
$query = 'SELECT * FROM newsletter';
2727

2828
$result = $dbRunnerService->runQuery($schema, $query);
29-
self::assertEquals([['id' => 1, 'content' => 'hello']], $result);
29+
self::assertEquals([['id', 'content'], ['1', 'hello']], $result->getResult());
3030

3131
$hashedSchema = $dbRunnerService->getDbRunner()->hashStatement($schema);
3232
$hashedQuery = $dbRunnerService->getDbRunner()->hashStatement($query);
@@ -39,7 +39,7 @@ public function testCache(): void
3939
INSERT INTO newsletter (content) VALUES ('hello');",
4040
'SELECT * FROM newsletter'
4141
);
42-
self::assertEquals([['id' => 1, 'content' => 'hello']], $result);
42+
self::assertEquals([['id', 'content'], ['1', 'hello']], $result->getResult());
4343
self::assertCount(1, $cache->getValues(), 'cache hit');
4444

4545
$result = $dbRunnerService->runQuery(
@@ -48,7 +48,7 @@ public function testCache(): void
4848
INSERT INTO newsletter (content) VALUES ('hello');",
4949
'SELECT * FROM newsletter -- normalization test'
5050
);
51-
self::assertEquals([['id' => 1, 'content' => 'hello']], $result);
51+
self::assertEquals([['id', 'content'], ['1', 'hello']], $result->getResult());
5252
self::assertCount(1, $cache->getValues(), 'cache hit');
5353

5454
$result = $dbRunnerService->runQuery(
@@ -57,7 +57,7 @@ public function testCache(): void
5757
INSERT INTO newsletter (content) VALUES ('hello');",
5858
"SELECT * FROM newsletter WHERE content == 'hello'"
5959
);
60-
self::assertEquals([['id' => 1, 'content' => 'hello']], $result);
60+
self::assertEquals([['id', 'content'], ['1', 'hello']], $result->getResult());
6161
self::assertCount(2, $cache->getValues(), 'cache not hit');
6262
}
6363

0 commit comments

Comments
 (0)