Skip to content

Commit

Permalink
Skip PHP 8.1 unstable daylight savings tests (#146)
Browse files Browse the repository at this point in the history
As discussed in #133, the PHP 8.1's date extension daylight saving
APIs have been suffering with instabilities. Let's skip the affected
tests until php/php-src#9165 is resolved.

Signed-off-by: Athos Ribeiro <[email protected]>

Signed-off-by: Athos Ribeiro <[email protected]>
  • Loading branch information
athos-ribeiro authored Sep 6, 2022
1 parent 75916a4 commit 4fe4677
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/Cron/DaylightSavingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ public function testOffsetIncrementsPreviousRunDate(): void
$this->assertEquals($dtExpected, $cron->getPreviousRunDate($dtCurrent, 0, false, $tz->getName()));
}

/**
* Skip due to PHP 8.1 date instabilities.
* For further references, see https://github.com/dragonmantank/cron-expression/issues/133
* @requires PHP <= 8.0.22
*/
public function testOffsetDecrementsNextRunDateAllowCurrent(): void
{
$tz = new \DateTimeZone("Europe/London");
Expand Down Expand Up @@ -144,6 +149,9 @@ public function testOffsetDecrementsNextRunDateAllowCurrent(): void
/**
* The fact that crons will run twice using this setup is expected.
* This can be avoided by using disallowing the current date or with additional checks outside this library
* Skip due to PHP 8.1 date instabilities.
* For further references, see https://github.com/dragonmantank/cron-expression/issues/133
* @requires PHP <= 8.0.22
*/
public function testOffsetDecrementsNextRunDateDisallowCurrent(): void
{
Expand Down Expand Up @@ -228,6 +236,11 @@ public function testOffsetIncrementsMultipleRunDates(): void
}
}

/**
* Skip due to PHP 8.1 date instabilities.
* For further references, see https://github.com/dragonmantank/cron-expression/issues/133
* @requires PHP <= 8.0.22
*/
public function testOffsetDecrementsMultipleRunDates(): void
{
$expression = "0 1 * * 0";
Expand Down Expand Up @@ -315,6 +328,11 @@ public function testOffsetIncrementsEveryOtherHour(): void
}
}

/**
* Skip due to PHP 8.1 date instabilities.
* For further references, see https://github.com/dragonmantank/cron-expression/issues/133
* @requires PHP <= 8.0.22
*/
public function testOffsetDecrementsEveryOtherHour(): void
{
$expression = "0 */2 * * *";
Expand Down

0 comments on commit 4fe4677

Please sign in to comment.