Skip to content

Commit

Permalink
refs #10778 fix code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
steinkel committed Mar 1, 2018
1 parent c41d243 commit 228207c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/TestCase/Routing/Middleware/RoutingMiddlewareTest.php
Expand Up @@ -18,6 +18,7 @@
use Cake\Core\Configure;
use Cake\Routing\Middleware\RoutingMiddleware;
use Cake\Routing\RouteBuilder;
use Cake\Routing\RouteCollection;
use Cake\Routing\Router;
use Cake\TestSuite\TestCase;
use TestApp\Application;
Expand Down Expand Up @@ -474,7 +475,7 @@ public function testCacheRoutes()
$response = new Response();
$next = function ($req, $res) {
$routeCollection = Cache::read('routeCollection', '_cake_router_');
$this->assertInstanceOf('\Cake\Routing\RouteCollection', $routeCollection);
$this->assertInstanceOf(RouteCollection::class, $routeCollection);

return $res;
};
Expand Down Expand Up @@ -520,11 +521,12 @@ public function testCacheNotUsedIfCacheDisabled()
* Test cache name is used
*
* @return void
* @expectedException InvalidArgumentException
* @expectedExceptionMessage The "notfound" cache configuration does not exist
*/
public function testCacheConfigNotFound()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('The "notfound" cache configuration does not exist');

Configure::write('Router.cache', true);
Configure::write('Router.cacheConfig', 'notfound');
Cache::setConfig('_cake_router_', [
Expand Down

0 comments on commit 228207c

Please sign in to comment.