mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-09 22:34:26 +02:00
Update App\Router-related tests after constructor signature change
This commit is contained in:
parent
1d0cd7328b
commit
ce04c13ea8
2 changed files with 30 additions and 13 deletions
|
@ -22,6 +22,7 @@
|
|||
namespace Friendica\Test\src\App;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Cache\ICache;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\LegacyModule;
|
||||
|
@ -175,7 +176,11 @@ class ModuleTest extends DatabaseTest
|
|||
$l10n = \Mockery::mock(L10n::class);
|
||||
$l10n->shouldReceive('t')->andReturnUsing(function ($args) { return $args; });
|
||||
|
||||
$router = (new App\Router([], $l10n))->loadRoutes(include __DIR__ . '/../../../static/routes.config.php');
|
||||
$cache = \Mockery::mock(ICache::class);
|
||||
$cache->shouldReceive('get')->with('routerDispatchData')->andReturn('')->atMost()->once();
|
||||
$cache->shouldReceive('set')->withAnyArgs()->andReturn(false)->atMost()->once();
|
||||
|
||||
$router = (new App\Router([], __DIR__ . '/../../../static/routes.config.php', $l10n, $cache));
|
||||
|
||||
$module = (new App\Module($name))->determineClass(new App\Arguments('', $command), $router, $config);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue