1

I need to create a dummy customer attribute in the eav/attributes table using an fixture provided by EcomDev_PHPUnit.

I tried using the tables fixture also this is the data I need to provide, but this clears the entire table and only leaves my one fixture which is not of great use.

tables:
  eav/attribute:
    - attribute_id: 50000
      entity_type_id: 1
      attribute_code: "required_fixture_attr"
      backend_type: "varchar"
      frontend_input: "text"
      frontend_label: "Customer Fixture Attr"
      is_required: 1
      is_user_defined: 0
      is_unique: 0

I can't find any documentation on how to use the EcomDev_PHPUnit_Model_Fixture_Processor_Attributes in an acceptable YAML format.

Does anybody know the format, or have another method of adding an attribute to the eav_attributes table so I am not dependant on the default attributes shipped with Magento?

1 Answer 1

2

As far as I saw the Table fixture removes all data from table when you use that fixture.

One solution you could try is to get rid of fixture in this case and add your attribute programatically in test setUp() method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.