mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Test for date ranges
This commit is contained in:
parent
2f4544e3bd
commit
fa5830f37b
@ -35,19 +35,19 @@ class RangeDetectionTest extends TestCase
|
||||
|
||||
foreach($ranges as $range)
|
||||
{
|
||||
$expanded_ranges[] = $this->makeRanges($range);
|
||||
$expanded_ranges = array_merge(array_values($expanded_ranges),array_values($this->makeRanges($range)));
|
||||
}
|
||||
|
||||
foreach($ranges as $range)
|
||||
{
|
||||
|
||||
}
|
||||
$value_count_array = array_count_values($expanded_ranges);
|
||||
|
||||
$value_count_array = array_diff($value_count_array, [1]);
|
||||
|
||||
$this->assertEquals(count($value_count_array), 1);
|
||||
}
|
||||
|
||||
|
||||
private function makeRanges(array $range)
|
||||
{
|
||||
|
||||
return range($range[0], $range[1]);
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user