firefly-iii/app/tests/factories/Limit.php
2014-08-28 07:53:54 +02:00

26 lines
584 B
PHP

<?php
use Carbon\Carbon;
use League\FactoryMuffin\Facade;
Facade::define(
'Limit',
[
'component_id' => 'factory|Budget',
'startdate' => function () {
$start = new Carbon;
$start->startOfMonth();
return $start;
},
'amount' => 100,
'repeats' => 'boolean',
'repeat_freq' => function () {
$frequencies = ['daily', 'weekly', 'monthly', 'quarterly', 'half-year', 'yearly'];
return $frequencies[rand(0, 5)];
}
]
);