phpunit for local plugin db tests: moodle_database::insert_record_raw() no fields found

Re: phpunit for local plugin db tests: moodle_database::insert_record_raw() no fields found

by Michael Beauregard -
Number of replies: 0

I spent quite a bit of time trying to figure out what is going on here. I finally gave up and created a brand new moodle dev environment (from the MAMP package), added my plugin, then initialized the phpunit test environment (using these instructions: http://docs.moodle.org/dev/PHPUnit_installation_in_OS_X#Install_PHPUnit) and now my test runs correctly.

Maybe it's a bug. Maybe it was because I added my plugin and table *after* I originally initialized the test env. Note that rerunning the 'php admin/tool/phpunit/cli/init.php' command did not help.