1
0
Fork 0
mirror of https://github.com/shlinkio/shlink.git synced 2025-05-10 09:14:26 +03:00

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
module/CLI/test/Command/Visit

View file

@ -62,7 +62,7 @@ class ProcessVisitsCommandTest extends TestCase
new Visit($shortUrl, new Visitor('', '', '12.34.56.78')),
];
$this->visitService->getUnlocatedVisits()->willReturn($visits)
->shouldBeCalledTimes(1);
->shouldBeCalledOnce();
$this->visitService->saveVisit(Argument::any())->shouldBeCalledTimes(count($visits));
$this->ipResolver->resolveIpLocation(Argument::any())->willReturn([])
@ -94,7 +94,7 @@ class ProcessVisitsCommandTest extends TestCase
new Visit($shortUrl, new Visitor('', '', null)),
];
$this->visitService->getUnlocatedVisits()->willReturn($visits)
->shouldBeCalledTimes(1);
->shouldBeCalledOnce();
$this->visitService->saveVisit(Argument::any())->shouldBeCalledTimes(count($visits) - 4);
$this->ipResolver->resolveIpLocation(Argument::any())->willReturn([])