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