mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
add validation to accompanying periods
This commit is contained in:
@@ -37,6 +37,18 @@ class DateRangeCoveringTest extends TestCase
|
||||
$this->assertNotContains(3, $cover->getIntersections()[0][2]);
|
||||
}
|
||||
|
||||
public function testCoveringWithMinCover1_NoCoveringWithNullDates()
|
||||
{
|
||||
$cover = new DateRangeCovering(1, new \DateTimeZone('Europe/Brussels'));
|
||||
$cover
|
||||
->add(new \DateTime('2021-10-05'), new \DateTime('2021-10-18'), 521)
|
||||
->add(new \DateTime('2021-10-26'), null, 663)
|
||||
->compute()
|
||||
;
|
||||
|
||||
$this->assertFalse($cover->hasIntersections());
|
||||
}
|
||||
|
||||
public function testCoveringWithMinCover1WithTwoIntersections()
|
||||
{
|
||||
$cover = new DateRangeCovering(1, new \DateTimeZone('Europe/Brussels'));
|
||||
|
Reference in New Issue
Block a user