From 8520a5002f8c03cac6e669048f8c43b443db0142 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 4 Apr 2015 22:27:51 +0200 Subject: [PATCH] Another attempt at fixing some tests. I'm probably searching in the wrong direction with this. --- tests/factories/all.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, ]