PHPUnit not creating tables for non-standard plugin

PHPUnit not creating tables for non-standard plugin

by Julen Pardo -
Number of replies: 2

Hi all,

I'm trying to test the plugin I'm currently developing (it's a block). But when I initialize phpunit, following the documentation, the tables defined in db/install.xml are not being created. The phpunit environment is correctly initialized, but without the table my plugin needs. The plugin is correctly installed in a Moodle environment, so it's no DDL problem.

I've also tried to initialize phpunit changing the moodledir/phpunit.xml and adding manually the testsuite for my plugin, but with no result.


Thanks in advance,

Julen

Average of ratings: -
In reply to Julen Pardo

Re: PHPUnit not creating tables for non-standard plugin

by David Monllaó -

Hi Julen,

Try to bump your plugin's version.php version.

In reply to David Monllaó

Re: PHPUnit not creating tables for non-standard plugin

by Julen Pardo -

Hi David,

Thanks for answering. I've discovered the problem, and was that the tables were being installed in a different database. Perhaps I didn't save properly the config.php with the phpunit configuration. In any case, I deserve a facepalm.


Best regards,

Julen