From 75bcc4ec4c12acfac1da17c1a8e15e3df63f9147 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya <alejandro@alejandrocelaya.com> Date: Sun, 1 May 2016 11:24:00 +0200 Subject: [PATCH] Fixed UrlShortenerTest after changing default chars --- tests/Service/UrlShortenerTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Service/UrlShortenerTest.php b/tests/Service/UrlShortenerTest.php index 010692a4..61580e0e 100644 --- a/tests/Service/UrlShortenerTest.php +++ b/tests/Service/UrlShortenerTest.php @@ -59,9 +59,9 @@ class UrlShortenerTest extends TestCase */ public function urlIsProperlyShortened() { - // 10 -> rY9zc + // 10 -> 12C1c $shortCode = $this->urlShortener->urlToShortCode(new Uri('http://foobar.com/12345/hello?foo=bar')); - $this->assertEquals('rY9zc', $shortCode); + $this->assertEquals('12C1c', $shortCode); } /** @@ -112,16 +112,16 @@ class UrlShortenerTest extends TestCase */ public function shortCodeIsProperlyParsed() { - // rY9zc -> 10 + // 12C1c -> 10 $shortUrl = new ShortUrl(); - $shortUrl->setShortCode('rY9zc') + $shortUrl->setShortCode('12C1c') ->setOriginalUrl('expected_url'); $repo = $this->prophesize(ObjectRepository::class); - $repo->findOneBy(['shortCode' => 'rY9zc'])->willReturn($shortUrl); + $repo->findOneBy(['shortCode' => '12C1c'])->willReturn($shortUrl); $this->em->getRepository(ShortUrl::class)->willReturn($repo->reveal()); - $url = $this->urlShortener->shortCodeToUrl('rY9zc'); + $url = $this->urlShortener->shortCodeToUrl('12C1c'); $this->assertEquals($shortUrl->getOriginalUrl(), $url); }