/**
  * Helper that sets up the maxima configuration. This allows maxima to be used
  * from test classes that cannot subclass this one, for whatever reason.
  */
 public static function setup_test_maxima_connection($testcase)
 {
     global $CFG;
     if (!qtype_stack_test_config::is_test_config_available()) {
         $testcase->markTestSkipped('To run the STACK unit tests, you must set up the Maxima configuration in phpunit.xml.');
     }
     qtype_stack_test_config::setup_test_maxima_connection();
 }
 /**
  * This step looks to see if there is information about a Maxima configuration
  * for testing in the config.php file. If there is, it sets STACK up to use
  * that. If not, it skips this scenario.
  *
  * @When /^I set up STACK using the PHPUnit configuration$/
  */
 public function iSetUpStackUsingThePhpunitConfiguration()
 {
     // The require_once is here, this file may be required by behat before including /config.php.
     require_once __DIR__ . '/../test_maxima_configuration.php';
     if (!qtype_stack_test_config::is_test_config_available()) {
         throw new SkippedException('To run the STACK tests, ' . ' you must define a Maxima configuration in config.php.');
     }
     qtype_stack_test_config::setup_test_maxima_connection();
 }