Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertOrderPaymentInformation.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Constraint\AbstractConstraint;
11 use Magento\Sales\Test\Page\Adminhtml\OrderIndex;
12 use Magento\Sales\Test\Page\Adminhtml\SalesOrderView;
13 
17 class AssertOrderPaymentInformation extends AbstractConstraint
18 {
28  public function processAssert(
29  OrderInjectable $order,
30  OrderIndex $orderIndex,
31  SalesOrderView $salesOrderView,
32  array $paymentInfo
33  ) {
34  $orderIndex->open();
35  $orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $order->getId()]);
37  $infoTab = $salesOrderView->getOrderForm()->openTab('info')->getTab('info');
38  $actualPaymentInformation = $infoTab->getPaymentInfoBlock()->getData();
39 
40  \PHPUnit\Framework\Assert::assertEmpty(
41  array_diff($paymentInfo, $actualPaymentInformation),
42  'Payment Information missmatch with expected values.'
43  );
44  }
45 
51  public function toString()
52  {
53  return 'Payment Information valid and matches with expected values.';
54  }
55 }
$paymentInfo
$order
Definition: order.php:55