public function testInvokesItselfIfRouteDoesNotMatchAtABoundary()
{
// e.g., if route is "/foo", but path is "/foobar", no match
$phpunit = $this;
$route = new Route('/foo', function ($req, $res, $next) use($phpunit) {
$phpunit->fail('Route should not be invoked if path does not match');
});
$this->queue->enqueue($route);
$triggered = null;
$done = function ($req, $res, $err = null) use(&$triggered) {
$triggered = true;
};
$this->request->withUri(new Uri('http://local.example.com/foobar'));
$next = new Next($this->queue, $done);
$next($this->request, $this->response);
$this->assertTrue($triggered);
}