Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertOrderBillingAndShippingAddressesAreDifferent.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Sales\Test\Page\Adminhtml\SalesOrderView;
9 use Magento\Mtf\Constraint\AbstractConstraint;
10 
15 {
23  public function processAssert(
24  SalesOrderView $salesOrderView,
25  $orderId
26  ) {
27  $salesOrderView->open(['order_id' => $orderId]);
28  $orderBillingAddress = $salesOrderView->getAddressesBlock()->getCustomerBillingAddress();
29  $orderShippingAddress = $salesOrderView->getAddressesBlock()->getCustomerShippingAddress();
30 
31  \PHPUnit\Framework\Assert::assertNotEquals(
32  $orderBillingAddress,
33  $orderShippingAddress,
34  "Billing and shipping addresses on order page are the same but shouldn't."
35  );
36  }
37 
43  public function toString()
44  {
45  return 'Billing and Shipping addresses are different on order page.';
46  }
47 }