Browse Source

Fix test.

second middleware returns the response in this example.
Mark Story 8 years ago
parent
commit
d3d1687f91
1 changed files with 4 additions and 1 deletions
  1. 4 1
      tests/TestCase/Routing/Middleware/RoutingMiddlewareTest.php

+ 4 - 1
tests/TestCase/Routing/Middleware/RoutingMiddlewareTest.php

@@ -246,6 +246,9 @@ class RoutingMiddlewareTest extends TestCase
     /**
      * Test control flow in scoped middleware.
      *
+     * Scoped middleware should be able to generate a response
+     * and abort lower layers.
+     *
      * @return void
      */
     public function testInvokeScopedMiddlewareReturnResponse()
@@ -283,7 +286,7 @@ class RoutingMiddlewareTest extends TestCase
         $result = $middleware($request, $response, $next);
 
         $this->assertSame($response, $result, 'Should return result');
-        $this->assertSame(['second'], $this->log);
+        $this->assertSame(['first', 'second'], $this->log);
     }
 
     /**