Various code cleanup

This commit is contained in:
James Cole
2017-08-12 07:47:42 +02:00
parent 81fb3df45e
commit 743547096e
39 changed files with 4885 additions and 3714 deletions

View File

@@ -130,9 +130,9 @@ class BudgetControllerTest extends TestCase
*/
public function testExpenseCategory(string $range)
{
$generator = $this->mock(GeneratorInterface::class);
$collector = $this->mock(JournalCollectorInterface::class);
$catRepos = $this->mock(CategoryRepositoryInterface::class);
$generator = $this->mock(GeneratorInterface::class);
$collector = $this->mock(JournalCollectorInterface::class);
$catRepos = $this->mock(CategoryRepositoryInterface::class);
$transactions = factory(Transaction::class, 10)->make();
$categories = factory(Category::class, 10)->make();

View File

@@ -77,9 +77,9 @@ class NewUserControllerTest extends TestCase
$data = [
'bank_name' => 'New bank',
'savings_balance' => '1000',
'bank_balance' => '100',
'bank_name' => 'New bank',
'savings_balance' => '1000',
'bank_balance' => '100',
];
$this->be($this->emptyUser());
$response = $this->post(route('new-user.submit'), $data);

View File

@@ -278,7 +278,7 @@ class SingleControllerTest extends TestCase
public function testStoreSuccess()
{
$this->markTestIncomplete('Mockery cannot yet handle PHP7.1 null argument method things.');
// mock results:
$repository = $this->mock(JournalRepositoryInterface::class);
$journal = new TransactionJournal();
@@ -295,7 +295,6 @@ class SingleControllerTest extends TestCase
$messages->add('attachments', 'Fake error');
// mock attachment helper, trigger an error AND and info thing.
$attachmentRepo = $this->mock(AttachmentHelperInterface::class);
$attachmentRepo->shouldReceive('saveAttachmentsForModel');