/** * @dataProvider pathProvider */ public function testBasePath($url, $basepath, $result) { $response = $this->execute([Middleware::BasePath($basepath), function ($request, $response, $next) { $response->getBody()->write((string) $request->getUri()); return $response; }], $url); $this->assertEquals($result, (string) $response->getBody()); }