diff options
Diffstat (limited to 'tests/RouterTest.php')
-rw-r--r-- | tests/RouterTest.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/RouterTest.php b/tests/RouterTest.php index 9b63360..ef19458 100644 --- a/tests/RouterTest.php +++ b/tests/RouterTest.php @@ -23,9 +23,9 @@ class RouterTest extends PHPUnit_Framework_TestCase } /** - * Test that on router 'run', method '__invoke' is called + * Test that on router 'handle', method '__invoke' is called */ - public function testRun() + public function testHandle() { $router = $this->createMock(Router::class, ['__invoke']); list($request, $response) = $this->getRequests(); @@ -34,7 +34,7 @@ class RouterTest extends PHPUnit_Framework_TestCase return ['request' => $arg1, 'response' => $arg2]; })); - $result = $router->run($request, $response); + $result = $router->handle($request, $response); $this->assertEquals($request, $result['request'], "Request was not processed correctly"); $this->assertEquals($response, $result['response'], "Response was not processed correctly"); @@ -148,7 +148,7 @@ class RouterTest extends PHPUnit_Framework_TestCase { $routes = [ '/foo' => Route::create(['fn' => function($request, $response) { - $response->testMiddlewareCalls[] = 'handle'; + $response->testMiddlewareCalls[] = 'run'; return $response; }]) ]; @@ -162,7 +162,7 @@ class RouterTest extends PHPUnit_Framework_TestCase return $response; }); - $this->assertEquals(['first','last','handle','outer'], $response->testMiddlewareCalls, "Actions were executed in wrong order"); + $this->assertEquals(['first','last','run','outer'], $response->testMiddlewareCalls, "Actions were executed in wrong order"); } /** |