Beispiel #1
0
 /**
  * @magentoDataFixture Magento/Catalog/_files/product_simple.php
  * @magentoDataFixture Magento/Customer/_files/customer.php
  * @magentoDbIsolation enabled
  * @magentoAppIsolation enabled
  */
 public function testCreateOrderExistingCustomer()
 {
     $productIdFromFixture = 1;
     $customerIdFromFixture = 1;
     $customerEmailFromFixture = '*****@*****.**';
     $shippingMethod = 'freeshipping_freeshipping';
     $paymentMethod = 'checkmo';
     $shippingAddressAsBilling = 1;
     $orderData = ['currency' => 'USD', 'billing_address' => array_merge($this->_getValidAddressData(), ['save_in_address_book' => '1']), 'shipping_method' => $shippingMethod, 'comment' => ['customer_note' => ''], 'send_confirmation' => false];
     $paymentData = ['method' => $paymentMethod];
     $this->_preparePreconditionsForCreateOrder($productIdFromFixture, $customerEmailFromFixture, $shippingMethod, $shippingAddressAsBilling, $paymentData, $orderData, $paymentMethod, $customerIdFromFixture);
     $order = $this->_model->createOrder();
     $this->_verifyCreatedOrder($order, $shippingMethod);
 }