Updated VisitsTracker so that the track method expects a Request object to be provided

This commit is contained in:
Alejandro Celaya
2016-08-09 08:52:06 +02:00
parent 34753ca7d3
commit 73a236b3d0
4 changed files with 11 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ use Shlinkio\Shlink\Core\Entity\ShortUrl;
use Shlinkio\Shlink\Core\Entity\Visit;
use Shlinkio\Shlink\Core\Repository\VisitRepository;
use Shlinkio\Shlink\Core\Service\VisitsTracker;
use Zend\Diactoros\ServerRequestFactory;
class VisitsTrackerTest extends TestCase
{
@@ -41,7 +42,7 @@ class VisitsTrackerTest extends TestCase
$this->em->persist(Argument::any())->shouldBeCalledTimes(1);
$this->em->flush()->shouldBeCalledTimes(1);
$this->visitsTracker->track($shortCode);
$this->visitsTracker->track($shortCode, ServerRequestFactory::fromGlobals());
}
/**