$CFG->behat_wwwroot, $CFG->behat_dataroot and $CFG->behat_prefix being undefined resulted in unit test failure.