mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-18 04:19:12 +00:00
Reformatted and checked everything. [skip ci]
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
|
||||
use \League\FactoryMuffin\Facade\FactoryMuffin;
|
||||
use League\FactoryMuffin\Facade\FactoryMuffin;
|
||||
|
||||
/**
|
||||
* Class BudgetControllerTest
|
||||
*/
|
||||
@@ -24,7 +25,6 @@ class BudgetControllerTest extends TestCase
|
||||
$budget->limits()->save($limit);
|
||||
|
||||
|
||||
|
||||
// mock budget repository:
|
||||
$budgets = $this->mock('Firefly\Storage\Budget\BudgetRepositoryInterface');
|
||||
$budgets->shouldReceive('get')->once()->andReturn([$budget]);
|
||||
@@ -46,7 +46,6 @@ class BudgetControllerTest extends TestCase
|
||||
$budget->limits()->save($limit);
|
||||
|
||||
|
||||
|
||||
// mock budget repository:
|
||||
$budgets = $this->mock('Firefly\Storage\Budget\BudgetRepositoryInterface');
|
||||
$budgets->shouldReceive('get')->once()->andReturn([$budget]);
|
||||
@@ -70,10 +69,10 @@ class BudgetControllerTest extends TestCase
|
||||
public function testStore()
|
||||
{
|
||||
$data = [
|
||||
'name' => 'X',
|
||||
'amount' => 100,
|
||||
'period' => 'monthly',
|
||||
'repeats' => 0
|
||||
'name' => 'X',
|
||||
'amount' => 100,
|
||||
'period' => 'monthly',
|
||||
'repeats' => 0
|
||||
];
|
||||
$return = $data;
|
||||
$return['repeat_freq'] = 'monthly';
|
||||
@@ -84,7 +83,7 @@ class BudgetControllerTest extends TestCase
|
||||
$budgets->shouldReceive('store')->with($return)->once()->andReturn(true);
|
||||
|
||||
// call
|
||||
$this->call('POST', '/budget/store',$data);
|
||||
$this->call('POST', '/budget/store', $data);
|
||||
|
||||
// test
|
||||
$this->assertResponseStatus(302);
|
||||
@@ -106,7 +105,7 @@ class BudgetControllerTest extends TestCase
|
||||
|
||||
|
||||
// call
|
||||
$this->call('GET', '/budget/show/'.$budget->id);
|
||||
$this->call('GET', '/budget/show/' . $budget->id);
|
||||
|
||||
// test
|
||||
$this->assertResponseOk();
|
||||
|
||||
Reference in New Issue
Block a user