Support for redirects with a condition before date

This commit is contained in:
Andrei Vasilev
2025-05-07 23:04:05 +07:00
committed by Alejandro Celaya
parent 77898d1edc
commit dae52fedf4
7 changed files with 44 additions and 2 deletions

View File

@@ -122,6 +122,7 @@ class RedirectRuleHandlerTest extends TestCase
'IP address, CIDR block or wildcard-pattern (1.2.*.*)' => '1.2.3.4',
'Country code to match?' => 'FR',
'City name to match?' => 'Los angeles',
'Date to match? (ISO 8601)' => '2016-05-01T20:34:16+02:00',
default => '',
},
);
@@ -186,6 +187,10 @@ class RedirectRuleHandlerTest extends TestCase
RedirectConditionType::GEOLOCATION_CITY_NAME,
[RedirectCondition::forGeolocationCityName('Los angeles')],
];
yield 'Before date' => [
RedirectConditionType::BEFORE_DATE,
[RedirectCondition::forBeforeDate('2016-05-01T20:34:16+02:00')],
];
}
#[Test]