mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Add API test for dynamic IP-based redirects
This commit is contained in:
@@ -70,6 +70,14 @@ class ShortUrlRedirectRulesFixture extends AbstractFixture implements DependentF
|
||||
);
|
||||
$manager->persist($iosRule);
|
||||
|
||||
$ipAddressRule = new ShortUrlRedirectRule(
|
||||
shortUrl: $defShortUrl,
|
||||
priority: 6,
|
||||
longUrl: 'https://example.com/static-ip-address',
|
||||
conditions: new ArrayCollection([RedirectCondition::forIpAddress('1.2.3.4')]),
|
||||
);
|
||||
$manager->persist($ipAddressRule);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user