comphist / cora

A web-based, token-level annotation tool for non-standard language data
http://www.linguistics.rub.de/comphist/resources/cora/
MIT License
10 stars 6 forks source link

DBUnit test maintenance #32

Open mbollmann opened 8 years ago

mbollmann commented 8 years ago

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?


mbollmann commented 8 years ago

Original comment by Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann):


Make DocumentAccessor tests use the new fixture (re issue #29)

mbollmann commented 8 years ago

Original comment by Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann):


Make TagsetAccessor tests use the new fixture (re issue #29)

mbollmann commented 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.