Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
FillAttributeFormOnProductPageStep.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Catalog\Test\Fixture\CatalogProductAttribute;
10 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit;
11 use Magento\Mtf\TestStep\TestStepInterface;
12 
16 class FillAttributeFormOnProductPageStep implements TestStepInterface
17 {
23  protected $attribute;
24 
31 
37  public function __construct(CatalogProductAttribute $attribute, CatalogProductEdit $catalogProductEdit)
38  {
39  $this->attribute = $attribute;
40  $this->catalogProductEdit = $catalogProductEdit;
41  }
42 
48  public function run()
49  {
50  $this->catalogProductEdit->getProductForm()->getAttributeForm()->fill($this->attribute);
51  return ['attribute' => $this->attribute];
52  }
53 }
__construct(CatalogProductAttribute $attribute, CatalogProductEdit $catalogProductEdit)