Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CreateShipmentEntityTest.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Mtf\TestCase\Injectable;
11 
29 class CreateShipmentEntityTest extends Injectable
30 {
31  /* tags */
32  const MVP = 'yes';
33  const TEST_TYPE = 'extended_acceptance_test';
34  /* end tags */
35 
41  public function __prepare()
42  {
43  $this->objectManager->create(
44  \Magento\Config\Test\TestStep\SetupConfigurationStep::class,
45  ['configData' => "checkmo,flatrate"]
46  )->run();
47  }
48 
56  public function test(OrderInjectable $order, array $data)
57  {
58  // Preconditions
59  $order->persist();
60 
61  // Steps
62  $createShipping = $this->objectManager->create(
63  \Magento\Sales\Test\TestStep\CreateShipmentStep::class,
64  ['order' => $order, 'data' => $data]
65  );
66 
67  return ['ids' => $createShipping->run()];
68  }
69 }
$order
Definition: order.php:55