You are here

public function ProportionalTest::testProratingProvider in Commerce Recurring Framework 8

Data provider for testProrating().

File

tests/src/Kernel/Plugin/Commerce/Prorater/ProportionalTest.php, line 65

Class

ProportionalTest
Tests the proportional prorater.

Namespace

Drupal\Tests\commerce_recurring\Kernel\Plugin\Commerce\Prorater

Code

public function testProratingProvider() {
  return [
    'full hour, full price' => [
      new Price('30', 'USD'),
      '2019-06-01 17:00:00',
    ],
    'half hour, half price' => [
      new Price('15', 'USD'),
      '2019-06-01 17:30:00',
    ],
    'partial half-hour, rounded' => [
      new Price('12.11', 'USD'),
      '2019-06-01 17:35:47',
    ],
  ];
}