firefly-iii/app/tests/factories/Limit.php

26 lines
584 B
PHP
Raw Normal View History

2014-08-21 08:16:12 -05:00
<?php
use Carbon\Carbon;
use League\FactoryMuffin\Facade;
Facade::define(
'Limit',
[
'component_id' => 'factory|Budget',
2014-08-28 00:53:54 -05:00
'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)];
}
2014-08-21 08:16:12 -05:00
]
);