/** * Assert that displayed attribute data on edit page equals passed from fixture. * * @param CatalogProductAttributeIndex $catalogProductAttributeIndex * @param CatalogProductAttributeEdit $catalogProductAttributeEdit * @param CatalogProductAttribute $attribute * @return void */ public function processAssert(CatalogProductAttributeIndex $catalogProductAttributeIndex, CatalogProductAttributeEdit $catalogProductAttributeEdit, CatalogProductAttribute $attribute) { $filter = ['attribute_code' => $attribute->getAttributeCode()]; $catalogProductAttributeIndex->open()->getGrid()->searchAndOpen($filter); $dataFixture = $attribute->getData(); $dataForm = $catalogProductAttributeEdit->getAttributeForm()->getData($attribute); $errors = $this->verifyData($dataFixture, $dataForm); \PHPUnit_Framework_Assert::assertEmpty($errors, $errors); }
/** * Prepare options data. * * @param array $optionsData * @return array */ protected function prepareOptionsData(array $optionsData) { return ['value' => $optionsData, 'optionsIds' => $this->attributeEdit->getAttributeForm()->getOptionsIds()]; }