test: Speed up comments test

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/53021/head
Joas Schilling 2025-05-17 16:44:22 +07:00
parent b91585c37f
commit 9d471877ae
No known key found for this signature in database
GPG Key ID: F72FA5B49FFA96B0
1 changed files with 2 additions and 0 deletions

@ -1099,6 +1099,7 @@ class ManagerTest extends TestCase {
* @return IComment[]
*/
private function proccessComments(array $data): array {
$this->connection->beginTransaction();
/** @var IComment[] */
$comments = [];
foreach ($data as $comment) {
@ -1114,6 +1115,7 @@ class ManagerTest extends TestCase {
$comment = $this->testSave($message, $actorId, $verb, $parentId, $id);
$comments[$comment->getMessage() . '#' . $comment->getActorId()] = $comment;
}
$this->connection->commit();
return $comments;
}