Fix tests (remove superfluous second parameter)

This commit is contained in:
nupplaPhil 2020-01-18 13:48:29 +01:00
parent 921845c3bd
commit 1c49f1169f
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
6 changed files with 12 additions and 27 deletions

View file

@ -34,7 +34,7 @@ class InstallerTest extends MockedTest
$dice = $dice->addRules(include __DIR__ . '/../../../static/dependencies.config.php');
$dice->shouldReceive('create')
->with(\Friendica\Core\L10n\L10n::class, [])
->with(\Friendica\Core\L10n\L10n::class)
->andReturn($this->l10nMock);
DI::init($dice);

View file

@ -19,14 +19,14 @@ class SemaphoreLockTest extends LockTest
$app = \Mockery::mock(App::class);
$app->shouldReceive('getHostname')->andReturn('friendica.local');
$dice->shouldReceive('create')->with(App::class, [])->andReturn($app);
$dice->shouldReceive('create')->with(App::class)->andReturn($app);
$configMock = \Mockery::mock(JitConfiguration::class);
$configMock
->shouldReceive('get')
->with('system', 'temppath', NULL, false)
->andReturn('/tmp/');
$dice->shouldReceive('create')->with(IConfiguration::class, [])->andReturn($configMock);
$dice->shouldReceive('create')->with(IConfiguration::class)->andReturn($configMock);
// @todo Because "get_temppath()" is using static methods, we have to initialize the BaseObject
DI::init($dice);

View file

@ -15,7 +15,7 @@ class SystemTest extends TestCase
$baseUrl = \Mockery::mock(BaseURL::class);
$baseUrl->shouldReceive('getHostname')->andReturn('friendica.local')->once();
$dice = \Mockery::mock(Dice::class);
$dice->shouldReceive('create')->with(BaseURL::class, [])->andReturn($baseUrl);
$dice->shouldReceive('create')->with(BaseURL::class)->andReturn($baseUrl);
DI::init($dice);
}