Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
FillAttributeFormStep.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\CatalogProductAttributeNew;
11 use Magento\Mtf\TestStep\TestStepInterface;
12 
16 class FillAttributeFormStep implements TestStepInterface
17 {
23  protected $attribute;
24 
30  protected $attributeNew;
31 
37  public function __construct(CatalogProductAttribute $productAttribute, CatalogProductAttributeNew $attributeNew)
38  {
39  $this->attribute = $productAttribute;
40  $this->attributeNew = $attributeNew;
41  }
42 
48  public function run()
49  {
50  $this->attributeNew->getAttributeForm()->fill($this->attribute);
51  return ['attribute' => $this->attribute];
52  }
53 }
__construct(CatalogProductAttribute $productAttribute, CatalogProductAttributeNew $attributeNew)