Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
State1.php
Go to the documentation of this file.
1 <?php
7 namespace Magento\Mtf\App\State;
8 
9 use Magento\Mtf\ObjectManager;
10 use Magento\Mtf\Util\Protocol\CurlInterface;
12 
16 class State1 extends AbstractState
17 {
23  protected $objectManager;
24 
30  protected $config ='admin_session_lifetime_1_hour, wysiwyg_disabled, admin_account_sharing_enable, log_to_file';
31 
37  private $curlTransport;
38 
44  public function __construct(
45  ObjectManager $objectManager,
46  CurlTransport $curlTransport,
47  array $arguments = []
48  ) {
49  parent::__construct($objectManager, $arguments);
50  $this->objectManager = $objectManager;
51  $this->curlTransport = $curlTransport;
52  }
53 
59  public function apply()
60  {
61  parent::apply();
62  $this->curlTransport->write($_ENV['app_frontend_url'], [], CurlInterface::GET);
63  $response = $this->curlTransport->read();
64  if (strpos($response, 'Home Page') !== false) {
65  $this->objectManager->create(
66  \Magento\Config\Test\TestStep\SetupConfigurationStep::class,
67  ['configData' => $this->config]
68  )->run();
69  }
70  }
71 
77  public function getName()
78  {
79  return 'Configuration Profile #1';
80  }
81 }
$response
Definition: 404.php:11
__construct(ObjectManager $objectManager, CurlTransport $curlTransport, array $arguments=[])
Definition: State1.php:44
$arguments