Created chainIpLocationResolver

This commit is contained in:
Alejandro Celaya
2018-11-11 13:18:21 +01:00
parent d152e2ef9a
commit fd6d180eba
47 changed files with 288 additions and 176 deletions

View File

@@ -98,8 +98,8 @@ class UrlShortenerTest extends TestCase
$conn = $this->prophesize(Connection::class);
$conn->isTransactionActive()->willReturn(true);
$this->em->getConnection()->willReturn($conn->reveal());
$this->em->rollback()->shouldBeCalledTimes(1);
$this->em->close()->shouldBeCalledTimes(1);
$this->em->rollback()->shouldBeCalledOnce();
$this->em->close()->shouldBeCalledOnce();
$this->em->flush()->willThrow(new ORMException());
$this->urlShortener->urlToShortCode(new Uri('http://foobar.com/12345/hello?foo=bar'));
@@ -135,7 +135,7 @@ class UrlShortenerTest extends TestCase
'custom-slug'
);
$slugify->shouldHaveBeenCalledTimes(1);
$slugify->shouldHaveBeenCalledOnce();
}
/**
@@ -153,8 +153,8 @@ class UrlShortenerTest extends TestCase
/** @var MethodProphecy $getRepo */
$getRepo = $this->em->getRepository(ShortUrl::class)->willReturn($repo->reveal());
$slugify->shouldBeCalledTimes(1);
$findBySlug->shouldBeCalledTimes(1);
$slugify->shouldBeCalledOnce();
$findBySlug->shouldBeCalledOnce();
$getRepo->shouldBeCalled();
$this->expectException(NonUniqueSlugException::class);