Fix test coverage.

This commit is contained in:
James Cole
2019-01-27 12:30:52 +01:00
parent c3e6e4f034
commit f6d88521dd
6 changed files with 55 additions and 38 deletions

View File

@@ -60,6 +60,11 @@ class PreferencesControllerTest extends TestCase
foreach ($available as $pref) {
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), $pref])->once();
}
// extra call for frontpage preference
$pref = new Preference;
$pref->data =[1];
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'frontPageAccounts',[]])->once()
->andReturn($pref);
// mock calls to transformer:
$transformer->shouldReceive('setParameters')->withAnyArgs()->atLeast()->once();