public function PriceSplitterTest::testEmptyOrder in Commerce Core 8.2
@covers ::split
File
- modules/
order/ tests/ src/ Kernel/ PriceSplitterTest.php, line 58
Class
- PriceSplitterTest
- Tests the price splitter.
Namespace
Drupal\Tests\commerce_order\KernelCode
public function testEmptyOrder() {
// Confirm that the splitter can be run on orders with no items.
$amounts = $this->splitter
->split($this->order, new Price('42', 'USD'), '50');
$this
->assertEquals([], $amounts);
$amounts = $this->splitter
->split($this->order, new Price('42', 'USD'));
$this
->assertEquals([], $amounts);
}