Code cleanup.

This commit is contained in:
James Cole
2018-04-02 14:17:11 +02:00
parent 4cea5d65a6
commit f96f38b172
44 changed files with 87 additions and 100 deletions

View File

@@ -370,7 +370,7 @@ class ProfileControllerTest extends TestCase
{
$token = '';
$currentToken = Preference::where('user_id', $this->user()->id)->where('name', 'access_token')->first();
if (!is_null($currentToken)) {
if (null !== $currentToken) {
$token = $currentToken->data;
}
$this->be($this->user());

View File

@@ -97,7 +97,7 @@ class BulkControllerTest extends TestCase
// default transactions
$collection = $this->user()->transactionJournals()->take(4)->get();
$allIds = $collection->pluck('id')->toArray();
$route = route('transactions.bulk.edit', join(',', $allIds));
$route = route('transactions.bulk.edit', implode(',', $allIds));
$this->be($this->user());
$response = $this->get($route);
$response->assertStatus(200);
@@ -133,7 +133,7 @@ class BulkControllerTest extends TestCase
// default transactions
$collection = $this->user()->transactionJournals()->take(4)->get();
$allIds = $collection->pluck('id')->toArray();
$route = route('transactions.bulk.edit', join(',', $allIds));
$route = route('transactions.bulk.edit', implode(',', $allIds));
$this->be($this->user());
$response = $this->get($route);
$response->assertStatus(200);

View File

@@ -162,7 +162,7 @@ class MassControllerTest extends TestCase
// default transactions
$collection = $this->user()->transactionJournals()->take(4)->get();
$allIds = $collection->pluck('id')->toArray();
$route = route('transactions.mass.edit', join(',', $allIds));
$route = route('transactions.mass.edit', implode(',', $allIds));
$this->be($this->user());
$response = $this->get($route);
$response->assertStatus(200);
@@ -204,7 +204,7 @@ class MassControllerTest extends TestCase
$allIds = $collection->pluck('id')->toArray();
$this->be($this->user());
$response = $this->get(route('transactions.mass.edit', join(',', $allIds)));
$response = $this->get(route('transactions.mass.edit', implode(',', $allIds)));
$response->assertStatus(200);
$response->assertSee('Edit a number of transactions');
$response->assertSessionHas('error', 'You have selected no valid transactions to edit.');