mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-09 23:14:26 +02:00
Fix a lot of notices/warnings/deprecation notes in the test directory
This commit is contained in:
parent
efaec26b1d
commit
d55ecb9288
77 changed files with 428 additions and 558 deletions
|
@ -29,6 +29,7 @@ use Friendica\LegacyModule;
|
|||
use Friendica\Module\HTTPException\PageNotFound;
|
||||
use Friendica\Module\WellKnown\HostMeta;
|
||||
use Friendica\Test\DatabaseTest;
|
||||
use Mockery;
|
||||
|
||||
class ModuleTest extends DatabaseTest
|
||||
{
|
||||
|
@ -170,13 +171,13 @@ class ModuleTest extends DatabaseTest
|
|||
*/
|
||||
public function testModuleClass($assert, string $name, string $command, bool $privAdd)
|
||||
{
|
||||
$config = \Mockery::mock(IConfig::class);
|
||||
$config = Mockery::mock(IConfig::class);
|
||||
$config->shouldReceive('get')->with('config', 'private_addons', false)->andReturn($privAdd)->atMost()->once();
|
||||
|
||||
$l10n = \Mockery::mock(L10n::class);
|
||||
$l10n = Mockery::mock(L10n::class);
|
||||
$l10n->shouldReceive('t')->andReturnUsing(function ($args) { return $args; });
|
||||
|
||||
$cache = \Mockery::mock(ICache::class);
|
||||
$cache = Mockery::mock(ICache::class);
|
||||
$cache->shouldReceive('get')->with('routerDispatchData')->andReturn('')->atMost()->once();
|
||||
$cache->shouldReceive('get')->with('lastRoutesFileModifiedTime')->andReturn('')->atMost()->once();
|
||||
$cache->shouldReceive('set')->withAnyArgs()->andReturn(false)->atMost()->twice();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue