From 9eb70b79621c7eea56aaa9ce7441a15b7ab4b212 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 26 Sep 2023 03:03:30 +0000 Subject: [PATCH] fix tests --- tests/Helper.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/Helper.php b/tests/Helper.php index e3f0d68..c3a0e54 100644 --- a/tests/Helper.php +++ b/tests/Helper.php @@ -22,11 +22,13 @@ use phpOMS\Utils\RnG\Email; use phpOMS\Utils\RnG\Text; class Helper { - public static function createAccounts(int $n = 10) : void + public static function createAccounts(int $n = 10) : array { $LOREM = \array_slice(Text::LOREM_IPSUM, 0, 25); $LOREM_COUNT = \count($LOREM) - 1; + $accounts = []; + for ($i = 0; $i < $n; ++$i) { $account = new Account(); @@ -40,6 +42,10 @@ class Helper { $account->setType(AccountType::USER); AccountMapper::create()->execute($account); + + $accounts[] = $account; } + + return $accounts; } }