mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Refactored short URL creation so that the long URL is part of the ShortUrlMeta
This commit is contained in:
@@ -57,7 +57,7 @@ class VisitLocatorTest extends TestCase
|
||||
): void {
|
||||
$unlocatedVisits = map(
|
||||
range(1, 200),
|
||||
fn (int $i) => new Visit(new ShortUrl(sprintf('short_code_%s', $i)), Visitor::emptyInstance()),
|
||||
fn (int $i) => new Visit(ShortUrl::withLongUrl(sprintf('short_code_%s', $i)), Visitor::emptyInstance()),
|
||||
);
|
||||
|
||||
$findVisits = $this->mockRepoMethod($expectedRepoMethodName)->willReturn($unlocatedVisits);
|
||||
@@ -107,7 +107,7 @@ class VisitLocatorTest extends TestCase
|
||||
bool $isNonLocatableAddress
|
||||
): void {
|
||||
$unlocatedVisits = [
|
||||
new Visit(new ShortUrl('foo'), Visitor::emptyInstance()),
|
||||
new Visit(ShortUrl::withLongUrl('foo'), Visitor::emptyInstance()),
|
||||
];
|
||||
|
||||
$findVisits = $this->mockRepoMethod($expectedRepoMethodName)->willReturn($unlocatedVisits);
|
||||
|
||||
Reference in New Issue
Block a user