Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SignifydCreateCustomerStep.php
Go to the documentation of this file.
1 <?php
7 
11 use Magento\Mtf\TestStep\TestStepFactory;
12 use Magento\Mtf\TestStep\TestStepInterface;
13 
17 class SignifydCreateCustomerStep implements TestStepInterface
18 {
24  private $customer;
25 
31  private $testStepFactory;
32 
37  public function __construct(
38  Customer $customer,
39  TestStepFactory $testStepFactory
40  ) {
41  $this->customer = $customer;
42  $this->testStepFactory = $testStepFactory;
43  }
44 
50  public function run()
51  {
52  $this->getStepInstance(CreateCustomerStep::class)->run();
53  }
54 
58  public function cleanup()
59  {
60  $this->getStepInstance(CreateCustomerStep::class)->cleanup();
61  $this->getStepInstance(DeleteCustomerStep::class)->run();
62  }
63 
70  private function getStepInstance($class)
71  {
72  return $this->testStepFactory->create(
73  $class,
74  ['customer' => $this->customer]
75  );
76  }
77 }
$customer
Definition: customers.php:11
__construct(Customer $customer, TestStepFactory $testStepFactory)
$_option $_optionId $class
Definition: date.phtml:13