mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-02-15 20:18:40 +00:00
fix tests
This commit is contained in:
parent
29d5e6b12c
commit
9eb70b7962
|
|
@ -22,11 +22,13 @@ use phpOMS\Utils\RnG\Email;
|
||||||
use phpOMS\Utils\RnG\Text;
|
use phpOMS\Utils\RnG\Text;
|
||||||
|
|
||||||
class Helper {
|
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 = \array_slice(Text::LOREM_IPSUM, 0, 25);
|
||||||
$LOREM_COUNT = \count($LOREM) - 1;
|
$LOREM_COUNT = \count($LOREM) - 1;
|
||||||
|
|
||||||
|
$accounts = [];
|
||||||
|
|
||||||
for ($i = 0; $i < $n; ++$i) {
|
for ($i = 0; $i < $n; ++$i) {
|
||||||
$account = new Account();
|
$account = new Account();
|
||||||
|
|
||||||
|
|
@ -40,6 +42,10 @@ class Helper {
|
||||||
$account->setType(AccountType::USER);
|
$account->setType(AccountType::USER);
|
||||||
|
|
||||||
AccountMapper::create()->execute($account);
|
AccountMapper::create()->execute($account);
|
||||||
|
|
||||||
|
$accounts[] = $account;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $accounts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user