Added cache adapter to the UrlShortener service to cache shortcode-url maps

This commit is contained in:
Alejandro Celaya
2016-08-08 10:02:52 +02:00
parent 3bd4f506e0
commit f49e9064cd
5 changed files with 56 additions and 11 deletions

View File

@@ -39,7 +39,7 @@ class ResolveUrlActionTest extends TestCase
$request = ServerRequestFactory::fromGlobals()->withAttribute('shortCode', $shortCode);
$response = $this->action->__invoke($request, new Response());
$this->assertEquals(400, $response->getStatusCode());
$this->assertEquals(404, $response->getStatusCode());
$this->assertTrue(strpos($response->getBody()->getContents(), RestUtils::INVALID_ARGUMENT_ERROR) > 0);
}