Defined new structure for tracking config, together with new options

This commit is contained in:
Alejandro Celaya
2021-05-16 09:30:04 +02:00
parent 8a8e3c3fc8
commit d423d18249
17 changed files with 176 additions and 55 deletions

View File

@@ -14,7 +14,7 @@ use Shlinkio\Shlink\Core\Entity\ShortUrl;
use Shlinkio\Shlink\Core\Entity\Visit;
use Shlinkio\Shlink\Core\EventDispatcher\Event\UrlVisited;
use Shlinkio\Shlink\Core\Model\Visitor;
use Shlinkio\Shlink\Core\Options\UrlShortenerOptions;
use Shlinkio\Shlink\Core\Options\TrackingOptions;
use Shlinkio\Shlink\Core\Visit\VisitsTracker;
class VisitsTrackerTest extends TestCase
@@ -24,7 +24,7 @@ class VisitsTrackerTest extends TestCase
private VisitsTracker $visitsTracker;
private ObjectProphecy $em;
private ObjectProphecy $eventDispatcher;
private UrlShortenerOptions $options;
private TrackingOptions $options;
public function setUp(): void
{
@@ -35,7 +35,7 @@ class VisitsTrackerTest extends TestCase
});
$this->eventDispatcher = $this->prophesize(EventDispatcherInterface::class);
$this->options = new UrlShortenerOptions();
$this->options = new TrackingOptions();
$this->visitsTracker = new VisitsTracker($this->em->reveal(), $this->eventDispatcher->reveal(), $this->options);
}