mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-09 16:53:11 +08:00
Created component wrapping the logic to determine what's the URL to redirect to for a ShortUrl
This commit is contained in:
@@ -16,6 +16,7 @@ use Shlinkio\Shlink\Core\Entity\ShortUrl;
|
||||
use Shlinkio\Shlink\Core\Model\ShortUrlIdentifier;
|
||||
use Shlinkio\Shlink\Core\Options\TrackingOptions;
|
||||
use Shlinkio\Shlink\Core\Service\ShortUrl\ShortUrlResolverInterface;
|
||||
use Shlinkio\Shlink\Core\ShortUrl\Helper\ShortUrlRedirectionBuilderInterface;
|
||||
use Shlinkio\Shlink\Core\Visit\VisitsTracker;
|
||||
|
||||
class PixelActionTest extends TestCase
|
||||
@@ -31,9 +32,13 @@ class PixelActionTest extends TestCase
|
||||
$this->urlResolver = $this->prophesize(ShortUrlResolverInterface::class);
|
||||
$this->visitTracker = $this->prophesize(VisitsTracker::class);
|
||||
|
||||
$redirectBuilder = $this->prophesize(ShortUrlRedirectionBuilderInterface::class);
|
||||
$redirectBuilder->buildShortUrlRedirect(Argument::cetera())->willReturn('http://domain.com/foo/bar');
|
||||
|
||||
$this->action = new PixelAction(
|
||||
$this->urlResolver->reveal(),
|
||||
$this->visitTracker->reveal(),
|
||||
$redirectBuilder->reveal(),
|
||||
new TrackingOptions(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user