Skip to main content
3 of 3
Rollback to Revision 1
Fabian Schmengler
  • 66.1k
  • 25
  • 188
  • 422

Setup scripts fail integration tests in Magento2

I have setup integration tests for app/code that was working fine.

Now I have a module that adds some product attributes in a setup script, it doesn't have any tests but it is part of the project. When running integration tests it will fail with the exception: Wrong entity ID

This happens when the setup does this:
$eavSetup->addAttribute(Product::ENTITY, $attributeCode, $attributeDefinition);

The error happens because table eav_entity_type is empty for some reason. what am I missing something here?

Domeglic
  • 542
  • 6
  • 21