From 146bba7228fb314cfc0ad313656f41d3e3feaabc Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Fri, 9 Oct 2015 18:03:34 -0500 Subject: [PATCH] Wrote test to cover raw encoding - Created a test to ensure that the AuraRouter is not encoding generated URIs. --- test/Router/AuraRouterTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/Router/AuraRouterTest.php b/test/Router/AuraRouterTest.php index bc77d3fc..93fabecf 100644 --- a/test/Router/AuraRouterTest.php +++ b/test/Router/AuraRouterTest.php @@ -200,4 +200,20 @@ public function testReturns404ResultIfAuraReturnsNullForFailedRoute() $this->assertFalse($result->isMethodFailure()); $this->assertSame([], $result->getAllowedMethods()); } + + /** + * @group 149 + */ + public function testGeneratedUriIsNotEncoded() + { + $router = new AuraRouter(); + $route = new Route('/foo/{id}', 'foo', ['GET'], 'foo'); + + $router->addRoute($route); + + $this->assertEquals( + '/foo/bar is not encoded', + $router->generateUri('foo', ['id' => 'bar is not encoded']) + ); + } }