Skip to content

Commit b0cb168

Browse files
committed
(fix): replace removed addQueryTransform/removeQueryTransform with addHook/removeTransform
1 parent 4146695 commit b0cb168

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/e2e/Adapter/Scopes/CollectionTests.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,18 +1222,19 @@ public function testTransformations(): void
12221222
'name' => 'value1',
12231223
]));
12241224

1225-
$database->addHook(new class () implements Transform {
1225+
$hook = new class () implements Transform {
12261226
public function transform(Event $event, string $query): string
12271227
{
12281228
return 'SELECT 1';
12291229
}
1230-
});
1230+
};
1231+
$database->addHook($hook);
12311232

12321233
$result = $database->getDocument('docs', 'doc1');
12331234

12341235
$this->assertTrue($result->isEmpty());
12351236

1236-
$database->removeQueryTransform('test');
1237+
$database->removeTransform($hook::class);
12371238
}
12381239

12391240
public function testSetGlobalCollection(): void

0 commit comments

Comments
 (0)