Posts made by Urs Hunkler

Picture of Core developers

Given the Behat rule file "local/more_rules/tests/behat/behat_local_core_rules.php" and the generator file "local/more_rules/tests/generator/lib.php".

The rules class is build with

class behat_local_more_rules extends behat_base {}

The generator class is build with

class local_more_rules_generator extends testing_data_generator {}

 

To be able to call the generator methods I need the reference to the generator class. In "lib/tests/behat/behat_data_generators.php" I found the line that gets the datagenerator

$this->datagenerator = testing_util::get_data_generator();

 

When I call the same line in my rules script I get an error. My solution for now is to hard code the connection to the generator with

require_once(__DIR__.'/../generator/lib.php');
$this->generator = new local_more_rules_generator();

 

This code works but I hope there might be a more general solution.

Average of ratings: -
Picture of Core developers

Given the file "local/more_rules/tests/behat/behat_local_more_rules.php" with a bug.

How can I configure the server (I use the PHP buildin webserver) or Behat to initialize a remote debugging session.

I tried to add the XDebug start parameter to the behat_wwwroot URL which started the debug session but broke the Behat process.

Average of ratings: -