Some light refactoring. No changes.

This commit is contained in:
James Cole
2018-01-25 18:41:27 +01:00
parent 53fc4f2740
commit 7c70732247
28 changed files with 76 additions and 133 deletions

View File

@@ -50,13 +50,16 @@ class CategoryControllerTest extends TestCase
*/
public function testAll(string $range)
{
$repository = $this->mock(CategoryRepositoryInterface::class);
$accountRepos = $this->mock(AccountRepositoryInterface::class);
$generator = $this->mock(GeneratorInterface::class);
$firstUse = new Carbon;
$firstUse->subDays(3);
$repository->shouldReceive('spentInPeriod')->andReturn('0');
$repository->shouldReceive('earnedInPeriod')->andReturn('0');
$repository->shouldReceive('firstUseDate')->andReturn(new Carbon('1900-01-01'))->once();
$repository->shouldReceive('firstUseDate')->andReturn($firstUse)->once();
$accountRepos->shouldReceive('getAccountsByType')->withArgs([[AccountType::DEFAULT, AccountType::ASSET]])->andReturn(new Collection)->once();
$generator->shouldReceive('multiSet')->once()->andReturn([]);