diff --git a/tests/factories/all.php b/tests/factories/all.php index c12158c9cc..44a7ca5469 100644 --- a/tests/factories/all.php +++ b/tests/factories/all.php @@ -50,8 +50,8 @@ FactoryMuffin::define( 'FireflyIII\Models\AccountType', [ 'type' => function () { $types = ['Expense account', 'Revenue account', 'Asset account']; - - return $types[rand(0, 2)]; + $count = DB::table('account_types')->count(); + return $types[$count]; }, 'editable' => 1, ]