MDL-66815 behat: question category generator must find right parent id
commit5d701a706c151103e5f9cb52f004a8240f76869a
authorTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 1 Oct 2019 15:43:22 +0000 (1 16:43 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 10 Oct 2019 22:51:39 +0000 (11 00:51 +0200)
tree43fd8a735d7f79076238709c9efdae8b7134f206
parentdf6f010a86b44809149bba7f8614792f8263ee63
MDL-66815 behat: question category generator must find right parent id

This is implemented in a bit of a hacky way, because the only other
alternative would be a large rewrite of the whole class, which is
not feasible for me right now. Note that many other types of thing
that can be generated suffer from the same issue. (E.g. if you ever
wanted to generate two groups with the same name in two different
courses and then add group memebers.)

It is worth doing a special-case fix for question categories, because
way Moodle works, it is inevitable that we end up with many categories
called 'top' in the database.
lib/tests/behat/behat_data_generators.php