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

@@ -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([])