Code for upgrade of various libraries.

This commit is contained in:
James Cole
2019-03-02 21:18:26 +01:00
parent 48219c9af3
commit 4ca60ca92a
11 changed files with 45 additions and 45 deletions

View File

@@ -153,7 +153,7 @@ class AccountControllerTest extends TestCase
$collector->shouldReceive('getTransactions')->andReturn(new Collection([$transaction]));
$generator->shouldReceive('multiCurrencyPieChart')->andReturn([]);
$budgetRepos->shouldReceive('getBudgets')->andReturn(new Collection);
$accountRepos->shouldReceive('oldestJournalDate')->andReturn(Carbon::createFromTimestamp(time())->startOfMonth());
$accountRepos->shouldReceive('oldestJournalDate')->andReturn(Carbon::createFromFormat('U',time())->startOfMonth());
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
@@ -219,7 +219,7 @@ class AccountControllerTest extends TestCase
$collector->shouldReceive('getTransactions')->andReturn(new Collection([$transaction]));
$generator->shouldReceive('multiCurrencyPieChart')->andReturn([]);
$categoryRepos->shouldReceive('getCategories')->andReturn(new Collection([$category]));
$accountRepos->shouldReceive('oldestJournalDate')->andReturn(Carbon::createFromTimestamp(time())->startOfMonth());
$accountRepos->shouldReceive('oldestJournalDate')->andReturn(Carbon::createFromFormat('U',time())->startOfMonth());
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
@@ -313,7 +313,7 @@ class AccountControllerTest extends TestCase
$collector->shouldReceive('getTransactions')->andReturn(new Collection([$transaction]));
$generator->shouldReceive('multiCurrencyPieChart')->andReturn([]);
$categoryRepos->shouldReceive('getCategories')->andReturn(new Collection([$account]));
$accountRepos->shouldReceive('oldestJournalDate')->andReturn(Carbon::createFromTimestamp(time())->startOfMonth());
$accountRepos->shouldReceive('oldestJournalDate')->andReturn(Carbon::createFromFormat('U',time())->startOfMonth());
$this->be($this->user());
$this->changeDateRange($this->user(), $range);

View File

@@ -92,7 +92,7 @@ class CreateControllerTest extends TestCase
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
$tomorrow = Carbon::create()->addDays(2);
$tomorrow = Carbon::now()->addDays(2);
$recurrence = $this->user()->recurrences()->first();
$data = [
'title' => 'hello' . random_int(1, 100000),
@@ -147,7 +147,7 @@ class CreateControllerTest extends TestCase
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
$tomorrow = Carbon::create()->addDays(2);
$tomorrow = Carbon::now()->addDays(2);
$recurrence = $this->user()->recurrences()->first();
$data = [
'title' => 'hello' . random_int(1, 100000),
@@ -202,7 +202,7 @@ class CreateControllerTest extends TestCase
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
$tomorrow = Carbon::create()->addDays(2);
$tomorrow = Carbon::now()->addDays(2);
$recurrence = $this->user()->recurrences()->first();
$data = [
'title' => 'hello' . random_int(1, 100000),
@@ -257,7 +257,7 @@ class CreateControllerTest extends TestCase
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
$tomorrow = Carbon::create()->addDays(2);
$tomorrow = Carbon::now()->addDays(2);
$recurrence = $this->user()->recurrences()->first();
$data = [
'title' => 'hello' . random_int(1, 100000),
@@ -313,7 +313,7 @@ class CreateControllerTest extends TestCase
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
$tomorrow = Carbon::create()->addDays(2);
$tomorrow = Carbon::now()->addDays(2);
$recurrence = $this->user()->recurrences()->first();
$data = [
'title' => 'hello' . random_int(1, 100000),
@@ -371,7 +371,7 @@ class CreateControllerTest extends TestCase
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
$tomorrow = Carbon::create()->addDays(2);
$tomorrow = Carbon::now()->addDays(2);
$recurrence = $this->user()->recurrences()->first();
$data = [
'title' => 'hello' . random_int(1, 100000),
@@ -429,7 +429,7 @@ class CreateControllerTest extends TestCase
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
$tomorrow = Carbon::create()->addDays(2);
$tomorrow = Carbon::now()->addDays(2);
$recurrence = $this->user()->recurrences()->first();
$data = [
'title' => 'hello' . random_int(1, 100000),

View File

@@ -107,7 +107,7 @@ class EditControllerTest extends TestCase
$recurringRepos->shouldReceive('update')->once();
$tomorrow = Carbon::create()->addDays(2);
$tomorrow = Carbon::now()->addDays(2);
$recurrence = $this->user()->recurrences()->first();
$data = [
'id' => $recurrence->id,

View File

@@ -82,8 +82,8 @@ class ReportControllerTest extends TestCase
$budgetRepository->shouldReceive('cleanupBudgets');
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
$start = Carbon::create()->startOfYear();
$end = Carbon::create()->endOfYear();
$start = Carbon::now()->startOfYear();
$end = Carbon::now()->endOfYear();
$fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($start);
$fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($end);
@@ -115,8 +115,8 @@ class ReportControllerTest extends TestCase
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
$start = Carbon::create()->startOfYear();
$end = Carbon::create()->endOfYear();
$start = Carbon::now()->startOfYear();
$end = Carbon::now()->endOfYear();
$fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($start);
$fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($end);
@@ -141,8 +141,8 @@ class ReportControllerTest extends TestCase
$generator = $this->mock(BYRG::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$reportHelper = $this->mock(ReportHelperInterface::class);
$start = Carbon::create()->startOfYear();
$end = Carbon::create()->endOfYear();
$start = Carbon::now()->startOfYear();
$end = Carbon::now()->endOfYear();
$fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($start);
$fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($end);
@@ -171,8 +171,8 @@ class ReportControllerTest extends TestCase
$generator = $this->mock(CYRG::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$reportHelper = $this->mock(ReportHelperInterface::class);
$start = Carbon::create()->startOfYear();
$end = Carbon::create()->endOfYear();
$start = Carbon::now()->startOfYear();
$end = Carbon::now()->endOfYear();
$budgetRepository->shouldReceive('cleanupBudgets');
@@ -203,8 +203,8 @@ class ReportControllerTest extends TestCase
$generator = $this->mock(SYRG::class);
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$reportHelper = $this->mock(ReportHelperInterface::class);
$start = Carbon::create()->startOfYear();
$end = Carbon::create()->endOfYear();
$start = Carbon::now()->startOfYear();
$end = Carbon::now()->endOfYear();
$fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($start);
$fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($end);
@@ -231,8 +231,8 @@ class ReportControllerTest extends TestCase
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$fiscalHelper = $this->mock(FiscalHelperInterface::class);
$reportHelper = $this->mock(ReportHelperInterface::class);
$start = Carbon::create()->startOfYear();
$end = Carbon::create()->endOfYear();
$start = Carbon::now()->startOfYear();
$end = Carbon::now()->endOfYear();
$fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($start);
$fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($end);
@@ -823,8 +823,8 @@ class ReportControllerTest extends TestCase
$fiscalHelper = $this->mock(FiscalHelperInterface::class);
$reportHelper = $this->mock(ReportHelperInterface::class);
$tag = $this->user()->tags()->find(1);
$start = Carbon::create()->startOfYear();
$end = Carbon::create()->endOfYear();
$start = Carbon::now()->startOfYear();
$end = Carbon::now()->endOfYear();
$fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($start);
$fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($end);