$cache = \Mockery::mock(ICache::class);
$cache->shouldReceive('get')->with('routerDispatchData')->andReturn('')->atMost()->once();
- $cache->shouldReceive('set')->withAnyArgs()->andReturn(false)->atMost()->once();
+ $cache->shouldReceive('get')->with('lastRoutesFileModifiedTime')->andReturn('')->atMost()->once();
+ $cache->shouldReceive('set')->withAnyArgs()->andReturn(false)->atMost()->twice();
$router = (new App\Router([], __DIR__ . '/../../../static/routes.config.php', $l10n, $cache));
],
],
'/post' => [
- '/it' => [Module\NodeInfo::class, [Router::POST]],
+ '/it' => [Module\WellKnown\NodeInfo::class, [Router::POST]],
],
'/double' => [Module\Profile\Index::class, [Router::GET, Router::POST]]
],
], '', $this->l10n, $this->cache))->loadRoutes($routes);
// Don't find GET
- $this->assertEquals(Module\NodeInfo::class, $router->getModuleClass('/post/it'));
+ $this->assertEquals(Module\WellKnown\NodeInfo::class, $router->getModuleClass('/post/it'));
$this->assertEquals(Module\Profile\Index::class, $router->getModuleClass('/double'));
}
}