コード例 #1
0
 /**
  * Set the mapping and fill the form.
  *
  * @param array $fields
  * @param SimpleElement|null $element
  * @return $this
  *
  * @SuppressWarnings(PHPMD.UnusedLocalVariable)
  */
 public function setFieldsData(array $fields, SimpleElement $element = null)
 {
     foreach ($fields as $key => $value) {
         $this->mapping[$key] = self::FIELD_PREFIX . $key;
     }
     return parent::setFieldsData($fields, $element);
 }
コード例 #2
0
 /**
  * Get data of tab.
  *
  * @param array|null $fields
  * @param SimpleElement|null $element
  * @return array
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 public function getFieldsData($fields = null, SimpleElement $element = null)
 {
     $context = $this->browser->find($this->advancedInventoryRootElement);
     $data = parent::getFieldsData($fields, $context);
     $context->find($this->doneButton)->click();
     return $data;
 }
コード例 #3
0
ファイル: Attributes.php プロジェクト: Doability/magento2dev
 /**
  * Fixture mapping.
  *
  * @param array|null $fields
  * @param string|null $parent
  * @return array
  */
 protected function dataMapping(array $fields = null, $parent = null)
 {
     if (isset($fields['custom_attribute'])) {
         $this->placeholders = ['attribute_code' => $fields['custom_attribute']['value']['code']];
         $this->applyPlaceholders();
     }
     return parent::dataMapping($fields, $parent);
 }