Add E2E tests for dynamic rule-based redirects

This commit is contained in:
Alejandro Celaya
2024-02-26 19:05:39 +01:00
parent 07ae92943d
commit df5ad554c1
5 changed files with 106 additions and 10 deletions

View File

@@ -16,8 +16,8 @@ class RedirectCondition extends AbstractEntity
private function __construct(
public readonly string $name,
private readonly RedirectConditionType $type,
public readonly string $matchValue,
public readonly ?string $matchKey = null,
private readonly string $matchValue,
private readonly ?string $matchKey = null,
) {
}

View File

@@ -19,7 +19,7 @@ class ShortUrlRedirectRule extends AbstractEntity
private readonly ShortUrl $shortUrl, // No need to read this field. It's used by doctrine
private readonly int $priority,
public readonly string $longUrl,
public readonly Collection $conditions = new ArrayCollection(),
private Collection $conditions = new ArrayCollection(),
) {
}