public function IntervalTest::ceilingDateProvider in Commerce Core 8.2
Data provider for ::testCeiling.
Return value
array A list of testCeiling function arguments.
File
- tests/
src/ Kernel/ IntervalTest.php, line 185
Class
- IntervalTest
- Tests the Interval class.
Namespace
Drupal\Tests\commerce\KernelCode
public function ceilingDateProvider() {
return [
[
'2017-02-24 17:15',
new Interval('1', 'hour'),
'2017-02-24 18:00',
],
[
'2017-02-24 17:15',
new Interval('2', 'hour'),
'2017-02-24 19:00',
],
[
'2017-02-24 17:15',
new Interval('1', 'day'),
'2017-02-25 00:00',
],
[
'2017-02-24 17:15',
new Interval('2', 'day'),
'2017-02-26 00:00',
],
[
'2017-02-24 17:15',
new Interval('1', 'week'),
'2017-02-27 00:00',
],
[
'2017-02-24 17:15',
new Interval('4', 'week'),
'2017-03-20 00:00',
],
[
'2017-02-24 17:15',
new Interval('1', 'month'),
'2017-03-01 00:00',
],
[
'2017-02-24 17:15',
new Interval('2', 'month'),
'2017-04-01 00:00',
],
[
'2017-02-24 17:15',
new Interval('1', 'year'),
'2018-01-01 00:00',
],
[
'2017-02-24 17:15',
new Interval('2', 'year'),
'2019-01-01 00:00',
],
];
}