Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ConfigureProductOnProductPageStep.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Catalog\Test\Page\Product\CatalogProductView;
10 use Magento\Mtf\Client\BrowserInterface;
11 use Magento\Mtf\Fixture\InjectableFixture;
12 use Magento\Mtf\TestStep\TestStepInterface;
13 
17 class ConfigureProductOnProductPageStep implements TestStepInterface
18 {
24  private $product;
25 
31  private $catalogProductView;
32 
38  private $browser;
39 
46  public function __construct(
47  CatalogProductView $catalogProductView,
48  BrowserInterface $browser,
49  InjectableFixture $product
50  ) {
51  $this->product = $product;
52  $this->catalogProductView = $catalogProductView;
53  $this->browser = $browser;
54  }
55 
61  public function run()
62  {
63  $this->browser->open($_ENV['app_frontend_url'] . $this->product->getUrlKey() . '.html');
64  $this->catalogProductView->getViewBlock()->configure($this->product);
65  }
66 }
__construct(CatalogProductView $catalogProductView, BrowserInterface $browser, InjectableFixture $product)