We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9374b67 commit 3794f5dCopy full SHA for 3794f5d
tests/RoutingTest.php
@@ -44,6 +44,21 @@ public function injects_route_placeholder()
44
$this->assertEquals('Hello matt', (string) $response->getBody());
45
}
46
47
+ /**
48
+ * @test
49
+ */
50
+ public function injects_route_placeholder_from_request()
51
+ {
52
+ $app = Bridge::create();
53
+ $app->get('/{name}', function ($request, $response) {
54
+ $response->getBody()->write('Hello ' . $request->getAttribute('name'));
55
+ return $response;
56
+ });
57
+
58
+ $response = $app->handle(RequestFactory::create('/matt'));
59
+ $this->assertEquals('Hello matt', (string) $response->getBody());
60
+ }
61
62
/**
63
* @test
64
*/
0 commit comments