mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 17:23:12 +08:00
Refactored short URL creation so that the long URL is part of the ShortUrlMeta
This commit is contained in:
@@ -19,7 +19,7 @@ class VisitTest extends TestCase
|
||||
*/
|
||||
public function isProperlyJsonSerialized(?Chronos $date): void
|
||||
{
|
||||
$visit = new Visit(new ShortUrl(''), new Visitor('Chrome', 'some site', '1.2.3.4'), true, $date);
|
||||
$visit = new Visit(ShortUrl::createEmpty(), new Visitor('Chrome', 'some site', '1.2.3.4'), true, $date);
|
||||
|
||||
self::assertEquals([
|
||||
'referer' => 'some site',
|
||||
@@ -41,7 +41,7 @@ class VisitTest extends TestCase
|
||||
*/
|
||||
public function addressIsAnonymizedWhenRequested(bool $anonymize, ?string $address, ?string $expectedAddress): void
|
||||
{
|
||||
$visit = new Visit(new ShortUrl(''), new Visitor('Chrome', 'some site', $address), $anonymize);
|
||||
$visit = new Visit(ShortUrl::createEmpty(), new Visitor('Chrome', 'some site', $address), $anonymize);
|
||||
|
||||
self::assertEquals($expectedAddress, $visit->getRemoteAddr());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user