mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-23 04:46:44 +00:00
Fix tests, remove some logging.
This commit is contained in:
@@ -53,7 +53,6 @@ class Amount
|
|||||||
{
|
{
|
||||||
$locale = explode(',', trans('config.locale'));
|
$locale = explode(',', trans('config.locale'));
|
||||||
$locale = array_map('trim', $locale);
|
$locale = array_map('trim', $locale);
|
||||||
Log::debug('formatAnything(). Will set locale to', $locale);
|
|
||||||
setlocale(LC_MONETARY, $locale);
|
setlocale(LC_MONETARY, $locale);
|
||||||
$float = round($amount, 12);
|
$float = round($amount, 12);
|
||||||
$info = localeconv();
|
$info = localeconv();
|
||||||
|
@@ -215,6 +215,7 @@ class BudgetControllerTest extends TestCase
|
|||||||
// mock budget repository
|
// mock budget repository
|
||||||
$budgetRepository = $this->mock(BudgetRepositoryInterface::class);
|
$budgetRepository = $this->mock(BudgetRepositoryInterface::class);
|
||||||
$budgetRepository->shouldReceive('spentInPeriod')->andReturn('1');
|
$budgetRepository->shouldReceive('spentInPeriod')->andReturn('1');
|
||||||
|
$budgetRepository->shouldReceive('getBudgetLimits')->andReturn(new Collection);
|
||||||
|
|
||||||
// mock journal collector:
|
// mock journal collector:
|
||||||
$collector = $this->mock(JournalCollectorInterface::class);
|
$collector = $this->mock(JournalCollectorInterface::class);
|
||||||
|
@@ -193,6 +193,12 @@ class CategoryControllerTest extends TestCase
|
|||||||
$collector->shouldReceive('setCategory')->andReturnSelf()->once();
|
$collector->shouldReceive('setCategory')->andReturnSelf()->once();
|
||||||
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10))->once();
|
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10))->once();
|
||||||
|
|
||||||
|
// mock category repository
|
||||||
|
$repository = $this->mock(CategoryRepositoryInterface::class);
|
||||||
|
$repository->shouldReceive('firstUseDate')->once()->andReturn(new Carbon);
|
||||||
|
$repository->shouldReceive('spentInPeriod')->andReturn('-1');
|
||||||
|
$repository->shouldReceive('earnedInPeriod')->andReturn('1');
|
||||||
|
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->changeDateRange($this->user(), $range);
|
$this->changeDateRange($this->user(), $range);
|
||||||
|
Reference in New Issue
Block a user