mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 15:18:05 +00:00
Improve test coverage.
This commit is contained in:
@@ -415,7 +415,7 @@ class RecurrenceFactoryTest extends TestCase
|
||||
$validator = $this->mock(AccountValidator::class);
|
||||
|
||||
// mock calls:
|
||||
Amount::shouldReceive('getDefaultCurrencyByUser')->andReturn(TransactionCurrency::find(1))->once();
|
||||
Amount::shouldReceive('getDefaultCurrencyByUser')->andReturn($this->getEuro())->once();
|
||||
$piggyFactory->shouldReceive('setUser')->once();
|
||||
$piggyFactory->shouldReceive('find')->withArgs([1, 'Bla bla'])->andReturn($piggyBank);
|
||||
|
||||
@@ -521,7 +521,7 @@ class RecurrenceFactoryTest extends TestCase
|
||||
$validator = $this->mock(AccountValidator::class);
|
||||
|
||||
// mock calls:
|
||||
Amount::shouldReceive('getDefaultCurrencyByUser')->andReturn(TransactionCurrency::find(1))->once();
|
||||
Amount::shouldReceive('getDefaultCurrencyByUser')->andReturn($this->getEuro())->once();
|
||||
$piggyFactory->shouldReceive('setUser')->once();
|
||||
$piggyFactory->shouldReceive('find')->withArgs([1, 'Bla bla'])->andReturn(null);
|
||||
|
||||
@@ -625,7 +625,7 @@ class RecurrenceFactoryTest extends TestCase
|
||||
$validator = $this->mock(AccountValidator::class);
|
||||
|
||||
// mock calls:
|
||||
Amount::shouldReceive('getDefaultCurrencyByUser')->andReturn(TransactionCurrency::find(1))->once();
|
||||
Amount::shouldReceive('getDefaultCurrencyByUser')->andReturn($this->getEuro())->once();
|
||||
$piggyFactory->shouldReceive('setUser')->once();
|
||||
$piggyFactory->shouldReceive('find')->withArgs([1, 'Bla bla'])->andReturn($piggyBank);
|
||||
|
||||
@@ -730,7 +730,7 @@ class RecurrenceFactoryTest extends TestCase
|
||||
$accountFactory = $this->mock(AccountFactory::class);
|
||||
|
||||
// mock calls:
|
||||
Amount::shouldReceive('getDefaultCurrencyByUser')->andReturn(TransactionCurrency::find(1))->once();
|
||||
Amount::shouldReceive('getDefaultCurrencyByUser')->andReturn($this->getEuro())->once();
|
||||
$piggyFactory->shouldReceive('setUser')->once();
|
||||
$piggyFactory->shouldReceive('find')->withArgs([1, 'Bla bla'])->andReturn($piggyBank);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user