Open mbollmann opened 8 years ago
Original comment by Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann):
Add new DB test fixture (re issue #29)
The new fixture uses the repo's main coradb.sql schema, helping it stay up-to-date, contains completely new data, and includes the data's source files as well as instructions how to modify and update it.
Originally reported by: Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann)
PHPUnit tests involving the database are currently using their own separate database creation scripts (in tests/data/). This is a nightmare to maintain, and the scripts are most likely out-of-date already, meaning we test against an outdated version of the database schema.
Isn't it possible to use the db/coradb.sql script for this purpose?
I know one reason for the separation is that there are two different DB creation scripts, most notably one which uses MyISAM instead of InnoDB and (therefore) doesn't consider foreign key checks. Still, can't this script maybe be derived automatically from the main db/coradb.sql one?