Code cleanup and realign.

This commit is contained in:
James Cole
2018-08-06 19:14:30 +02:00
parent f7eef25fed
commit 5908c0ce8c
188 changed files with 1019 additions and 1031 deletions

View File

@@ -65,7 +65,7 @@ class TransactionControllerTest extends TestCase
$this->session(['start' => $date, 'end' => clone $date]);
// mock stuff
$transfer = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 3)->first();
$transfer = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 3)->first();
$repository = $this->mock(JournalRepositoryInterface::class);
$collector = $this->mock(JournalCollectorInterface::class);
$repository->shouldReceive('firstNull')->twice()->andReturn($transfer);
@@ -99,7 +99,7 @@ class TransactionControllerTest extends TestCase
$this->session(['start' => $date, 'end' => clone $date]);
// mock stuff
$transfer = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 3)->first();
$transfer = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 3)->first();
$repository = $this->mock(JournalRepositoryInterface::class);
$collector = $this->mock(JournalCollectorInterface::class);
$repository->shouldReceive('firstNull')->twice()->andReturn($transfer);
@@ -143,7 +143,7 @@ class TransactionControllerTest extends TestCase
// mock stuff
$repository = $this->mock(JournalRepositoryInterface::class);
$collector = $this->mock(JournalCollectorInterface::class);
$transfer = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 3)->first();
$transfer = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 3)->first();
$repository->shouldReceive('firstNull')->once()->andReturn($transfer);
$repository->shouldReceive('firstNull')->once()->andReturn($transfer);
@@ -186,7 +186,7 @@ class TransactionControllerTest extends TestCase
// mock stuff
$repository = $this->mock(JournalRepositoryInterface::class);
$collector = $this->mock(JournalCollectorInterface::class);
$transfer = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 3)->first();
$transfer = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 3)->first();
$repository->shouldReceive('firstNull')->once()->andReturn($transfer);
$repository->shouldReceive('firstNull')->once()->andReturn($transfer);
@@ -204,7 +204,7 @@ class TransactionControllerTest extends TestCase
$collector->shouldReceive('getJournals')->andReturn($collection);
$this->be($this->user());
$response = $this->get(route('transactions.index', ['transfer', '2016-01-01','2015-12-31']));
$response = $this->get(route('transactions.index', ['transfer', '2016-01-01', '2015-12-31']));
$response->assertStatus(200);
// has bread crumb
$response->assertSee('<ol class="breadcrumb">');
@@ -229,7 +229,7 @@ class TransactionControllerTest extends TestCase
// mock stuff
$repository = $this->mock(JournalRepositoryInterface::class);
$collector = $this->mock(JournalCollectorInterface::class);
$transfer = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 3)->first();
$transfer = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 3)->first();
$repository->shouldReceive('firstNull')->once()->andReturn($transfer);
$repository->shouldReceive('firstNull')->once()->andReturn($transfer);
@@ -272,7 +272,7 @@ class TransactionControllerTest extends TestCase
// mock stuff
$repository = $this->mock(JournalRepositoryInterface::class);
$collector = $this->mock(JournalCollectorInterface::class);
$transfer = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 3)->first();
$transfer = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 3)->first();
$repository->shouldReceive('firstNull')->once()->andReturn($transfer);
$repository->shouldReceive('firstNull')->once()->andReturn($transfer);