public function OrderBillingAddressTest::testIncompleteOrder in Commerce Core 8.2
::covers evaluate.
File
- modules/
order/ tests/ src/ Unit/ Plugin/ Commerce/ Condition/ OrderBillingAddressTest.php, line 21
Class
- OrderBillingAddressTest
- @coversDefaultClass \Drupal\commerce_order\Plugin\Commerce\Condition\OrderBillingAddress @group commerce
Namespace
Drupal\Tests\commerce_order\Unit\Plugin\Commerce\ConditionCode
public function testIncompleteOrder() {
$condition = new OrderBillingAddress([
'zone' => [
'territories' => [
[
'country_code' => 'US',
'administrative_area' => 'CA',
],
],
],
], 'order_billing_address', [
'entity_type' => 'commerce_order',
]);
$order = $this
->prophesize(OrderInterface::class);
$order
->getEntityTypeId()
->willReturn('commerce_order');
$order
->getBillingProfile()
->willReturn(NULL);
$order = $order
->reveal();
$this
->assertFalse($condition
->evaluate($order));
}