public function IntervalTest::additionDateProvider in Commerce Core 8.2
Data provider for ::testAddition.
Return value
array A list of testAddition function arguments.
File
- tests/
src/ Kernel/ IntervalTest.php, line 102
Class
- IntervalTest
- Tests the Interval class.
Namespace
Drupal\Tests\commerce\KernelCode
public function additionDateProvider() {
return [
[
'2017-02-24 17:15',
new Interval('1', 'hour'),
'2017-02-24 18:15',
],
[
'2017-02-24 17:15',
new Interval('8', 'hour'),
'2017-02-25 01:15',
],
[
'2017-02-24 17:15',
new Interval('1', 'day'),
'2017-02-25 17:15',
],
[
'2017-02-24 17:15',
new Interval('14', 'day'),
'2017-03-10 17:15',
],
[
'2017-02-24 17:15',
new Interval('1', 'week'),
'2017-03-03 17:15',
],
[
'2017-02-24 17:15',
new Interval('3', 'week'),
'2017-03-17 17:15',
],
[
'2017-02-24 17:15',
new Interval('1', 'month'),
'2017-03-24 17:15',
],
[
'2017-02-24 17:15',
new Interval('2', 'month'),
'2017-04-24 17:15',
],
[
'2017-01-31 17:15',
new Interval('1', 'month'),
'2017-02-28 17:15',
],
[
'2017-02-28 17:15',
new Interval('1', 'month'),
'2017-03-28 17:15',
],
[
'2017-01-31 17:15',
new Interval('3', 'month'),
'2017-04-30 17:15',
],
[
'2017-02-24 17:15',
new Interval('1', 'year'),
'2018-02-24 17:15',
],
[
'2017-02-24 17:15',
new Interval('2', 'year'),
'2019-02-24 17:15',
],
];
}