Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Wrote test to cover raw encoding
Browse files Browse the repository at this point in the history
- Created a test to ensure that the AuraRouter is not encoding generated
  URIs.
  • Loading branch information
weierophinney committed Oct 9, 2015
1 parent d95a65b commit 146bba7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/Router/AuraRouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
);
}
}

0 comments on commit 146bba7

Please sign in to comment.