When I read the documentation, it is my understanding that when I want to run an integration test, Magento should create a fresh new installation. So I copied
install-config-mysql.php with the proper credentials, the database exists, but as soon as I try to run the most simple integration test:
vendor/bin/phpunit \ -c dev/tests/integration/phpunit.xml.dist \ app/code/Vendor/Module/Test/Integration
... I get the following error (along with a huge stack trace):
Exception: Starting Magento installation: File permissions check... [Progress: 1 / 541] Required extensions check... [Progress: 2 / 541] Enabling Maintenance Mode... [Progress: 3 / 541] Installing deployment configuration... [Progress: 4 / 541] Installing database schema: [Zend_Db_Statement_Exception] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento_integration_tests.store_website' doesn't exist, query was: SELECT `main_table`.* FROM `store_website` AS `main_table` ORDER BY main_table.sort_order ASC, main_table.name ASC
Now, I could paste the stack trace but there is nothing useful there. That is: there is no reference to my own module whatsoever, nor to any 3rd party modules.
So does anyone have a clue why this happens? My best guess is that somewhere in the code the store table is already referenced prior before it is created (or Magento is installed at all for that matter).