public function OrderReceiptTest::testOrderReceiptDisabled in Commerce Core 8.2
Tests disabling the order receipt.
File
- modules/
order/ tests/ src/ Kernel/ OrderReceiptTest.php, line 189
Class
- OrderReceiptTest
- Tests the sending of multilingual order receipt emails.
Namespace
Drupal\Tests\commerce_order\KernelCode
public function testOrderReceiptDisabled() {
$order_type = OrderType::load($this->order
->bundle());
$order_type
->setSendReceipt(FALSE);
$order_type
->save();
$this->order
->getState()
->applyTransitionById('place');
$this->order
->save();
$this
->assertCount(0, $this
->getMails());
}