Fix tests.

This commit is contained in:
James Cole
2018-04-14 21:21:20 +02:00
parent 15a22f0bfc
commit 62b68c6a21
6 changed files with 74 additions and 105 deletions

View File

@@ -49,15 +49,16 @@ class BillTransformerTest extends TestCase
$bill = Bill::create(
[
'user_id' => $this->user()->id,
'name' => 'Some bill ' . random_int(1, 10000),
'match' => 'word,' . random_int(1, 10000),
'amount_min' => 12.34,
'amount_max' => 45.67,
'date' => '2018-01-02',
'repeat_freq' => 'weekly',
'skip' => 0,
'active' => 1,
'user_id' => $this->user()->id,
'name' => 'Some bill ' . random_int(1, 10000),
'match' => 'word,' . random_int(1, 10000),
'amount_min' => 12.34,
'amount_max' => 45.67,
'transaction_currency_id' => 1,
'date' => '2018-01-02',
'repeat_freq' => 'weekly',
'skip' => 0,
'active' => 1,
]
);
$transformer = new BillTransformer(new ParameterBag);
@@ -77,15 +78,16 @@ class BillTransformerTest extends TestCase
$bill = Bill::create(
[
'user_id' => $this->user()->id,
'name' => 'Some bill ' . random_int(1, 10000),
'match' => 'word,' . random_int(1, 10000),
'amount_min' => 12.34,
'amount_max' => 45.67,
'date' => '2018-01-02',
'repeat_freq' => 'weekly',
'skip' => 0,
'active' => 1,
'user_id' => $this->user()->id,
'name' => 'Some bill ' . random_int(1, 10000),
'match' => 'word,' . random_int(1, 10000),
'amount_min' => 12.34,
'amount_max' => 45.67,
'date' => '2018-01-02',
'transaction_currency_id' => 1,
'repeat_freq' => 'weekly',
'skip' => 0,
'active' => 1,
]
);
$noteText = 'I are a note ' . random_int(1, 10000);
@@ -121,15 +123,16 @@ class BillTransformerTest extends TestCase
$repository->shouldReceive('getPaidDatesInRange')->andReturn(new Collection([new Carbon('2018-01-02')]));
$bill = Bill::create(
[
'user_id' => $this->user()->id,
'name' => 'Some bill ' . random_int(1, 10000),
'match' => 'word,' . random_int(1, 10000),
'amount_min' => 12.34,
'amount_max' => 45.67,
'date' => '2018-01-02',
'repeat_freq' => 'monthly',
'skip' => 0,
'active' => 1,
'user_id' => $this->user()->id,
'name' => 'Some bill ' . random_int(1, 10000),
'match' => 'word,' . random_int(1, 10000),
'amount_min' => 12.34,
'amount_max' => 45.67,
'date' => '2018-01-02',
'transaction_currency_id' => 1,
'repeat_freq' => 'monthly',
'skip' => 0,
'active' => 1,
]
);
$parameters = new ParameterBag();