Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Expand some tests.
James Coleac66e89edb12
diff --git a/tests/Feature/Controllers/Account/ReconcileControllerTest.php b/tests/Feature/Controllers/Account/ReconcileControllerTest.phpindex 11d8428f41..56b9db3fd5 100644--- a/tests/Feature/Controllers/Account/ReconcileControllerTest.php+++ b/tests/Feature/Controllers/Account/ReconcileControllerTest.php@@ -205,6 +205,7 @@ class ReconcileControllerTest extends TestCase'transactions' => [1, 2, 3],'reconcile' => 'create','difference' => '5',+ 'start' => '20170101','end' => '20170131',];$this->be($this->user());diff --git a/tests/Feature/Controllers/AccountControllerTest.php b/tests/Feature/Controllers/AccountControllerTest.phpindex 10545c362d..653e708ca4 100644--- a/tests/Feature/Controllers/AccountControllerTest.php+++ b/tests/Feature/Controllers/AccountControllerTest.php@@ -97,7 +97,7 @@ class AccountControllerTest extends TestCase// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);$repository = $this->mock(AccountRepositoryInterface::class);- $repository->shouldReceive('find')->withArgs([0])->once()->andReturn(new Account);+ $repository->shouldReceive('findNull')->withArgs([0])->once()->andReturn(null);$repository->shouldReceive('destroy')->andReturn(true);$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);@@ -285,7 +285,6 @@ class AccountControllerTest extends TestCase// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);$repository = $this->mock(AccountRepositoryInterface::class);- $repository->shouldReceive('find')->andReturn(new Account)->once();$repository->shouldReceive('store')->once()->andReturn(factory(Account::class)->make());$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);@@ -313,7 +312,6 @@ class AccountControllerTest extends TestCase// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);$repository = $this->mock(AccountRepositoryInterface::class);- $repository->shouldReceive('find')->andReturn(new Account)->once();$repository->shouldReceive('store')->once()->andReturn(factory(Account::class)->make());$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);@@ -339,7 +337,6 @@ class AccountControllerTest extends TestCase// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);$repository = $this->mock(AccountRepositoryInterface::class);- $repository->shouldReceive('find')->andReturn(new Account)->once();$repository->shouldReceive('update')->once();$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);@@ -365,7 +362,6 @@ class AccountControllerTest extends TestCase// mock stuff$journalRepos = $this->mock(JournalRepositoryInterface::class);$repository = $this->mock(AccountRepositoryInterface::class);- $repository->shouldReceive('find')->andReturn(new Account)->once();$repository->shouldReceive('update')->once();$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);diff --git a/tests/Feature/Controllers/BudgetControllerTest.php b/tests/Feature/Controllers/BudgetControllerTest.phpindex 1714938100..c2eab2c134 100644--- a/tests/Feature/Controllers/BudgetControllerTest.php+++ b/tests/Feature/Controllers/BudgetControllerTest.php@@ -576,7 +576,7 @@ class BudgetControllerTest extends TestCase$repository->shouldReceive('find')->andReturn($budget);$repository->shouldReceive('update');$repository->shouldReceive('cleanupBudgets');-+$this->session(['budgets.edit.uri' => 'http://localhost']);$data = [diff --git a/tests/Feature/Controllers/Transaction/BulkControllerTest.php b/tests/Feature/Controllers/Transaction/BulkControllerTest.phpindex 50ae40119c..1b780d871f 100644--- a/tests/Feature/Controllers/Transaction/BulkControllerTest.php+++ b/tests/Feature/Controllers/Transaction/BulkControllerTest.php@@ -203,7 +203,7 @@ class BulkControllerTest extends TestCase$repository->shouldReceive('updateBudget')->times(4)->andReturn(new TransactionJournal())->withArgs([Mockery::any(), $data['budget_id']]);- $repository->shouldReceive('updateTags')->times(4)->andReturn(true)+ $repository->shouldReceive('updateTags')->times(4)->andReturn(new TransactionJournal())->withArgs([Mockery::any(), $tags]);