From 79d7f577e4a89f603b871f2d6de37bb229e0d12b Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 14 Mar 2016 20:50:19 +0100 Subject: [PATCH] Small bug fixes. Signed-off-by: James Cole --- app/Jobs/MailError.php | 10 +++++----- .../migrations/2014_12_13_190730_changes_for_v321.php | 2 +- .../migrations/2016_01_11_193428_changes_for_v370.php | 1 - tests/TestCase.php | 8 ++++---- tests/acceptance/Controllers/CsvControllerTest.php | 1 - 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/app/Jobs/MailError.php b/app/Jobs/MailError.php index 577e5d2e7b..ff7ac4710b 100644 --- a/app/Jobs/MailError.php +++ b/app/Jobs/MailError.php @@ -26,7 +26,7 @@ class MailError extends Job implements ShouldQueue /** @var array */ protected $exception; /** @var string */ - protected $ip; + protected $ipAddress; /** @var User */ protected $user; @@ -35,16 +35,16 @@ class MailError extends Job implements ShouldQueue * * @param User $user * @param string $destination - * @param string $ip + * @param string $ipAddress * @param array $exceptionData * * @internal param array $exception */ - public function __construct(User $user, string $destination, string $ip, array $exceptionData) + public function __construct(User $user, string $destination, string $ipAddress, array $exceptionData) { $this->user = $user; $this->destination = $destination; - $this->ip = $ip; + $this->ipAddress = $ipAddress; $this->exception = $exceptionData; Log::debug('In mail job constructor'); @@ -65,7 +65,7 @@ class MailError extends Job implements ShouldQueue $args = $this->exception; $args['loggedIn'] = !is_null($this->user->id); $args['user'] = $this->user; - $args['ip'] = $this->ip; + $args['ip'] = $this->ipAddress; Mail::send( ['emails.error-html', 'emails.error'], $args, diff --git a/database/migrations/2014_12_13_190730_changes_for_v321.php b/database/migrations/2014_12_13_190730_changes_for_v321.php index 1cf0916e11..3a497d4bc7 100644 --- a/database/migrations/2014_12_13_190730_changes_for_v321.php +++ b/database/migrations/2014_12_13_190730_changes_for_v321.php @@ -81,7 +81,7 @@ class ChangesForV321 extends Migration $this->renameBudgetLimits(); // 14. $this->renamePiggyBankEvents(); // 15. $this->renameBudgetLimitToBudgetInRepetitions(); // 16. - // 17, 18, 19 + // 17 and then 18 and then 19 $this->dropFieldsFromCurrencyTable(); // 20. diff --git a/database/migrations/2016_01_11_193428_changes_for_v370.php b/database/migrations/2016_01_11_193428_changes_for_v370.php index 996bb6ada7..af60fcce40 100644 --- a/database/migrations/2016_01_11_193428_changes_for_v370.php +++ b/database/migrations/2016_01_11_193428_changes_for_v370.php @@ -67,7 +67,6 @@ class ChangesForV370 extends Migration ); - // new table "rules": Schema::create( 'rules', function (Blueprint $table) { $table->increments('id'); diff --git a/tests/TestCase.php b/tests/TestCase.php index df6bace4ed..a0245e08d8 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -36,13 +36,13 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase // set period to match? } - // if selected "custom", change the session to a weird custom range: + // custom is a weird range // (20 days): - if ($range === "custom") { + if ($range === 'custom') { $this->session( [ - 'start' => Carbon::now(), - 'end' => Carbon::now()->subDays(20), + 'start' => Carbon::now()->subDays(20), + 'end' => Carbon::now(), ] ); } diff --git a/tests/acceptance/Controllers/CsvControllerTest.php b/tests/acceptance/Controllers/CsvControllerTest.php index 3632c511e9..0034d9c77a 100644 --- a/tests/acceptance/Controllers/CsvControllerTest.php +++ b/tests/acceptance/Controllers/CsvControllerTest.php @@ -164,7 +164,6 @@ class CsvControllerTest extends TestCase public function testProcess() { $this->be($this->user()); - //$this->session($this->getSessionData()); $fields = ['csv-file', 'csv-date-format', 'csv-has-headers', 'csv-map', 'csv-roles', 'csv-mapped', 'csv-delimiter']; $wizard = $this->mock('FireflyIII\Helpers\Csv\WizardInterface');