Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
tool_generator\local\testscenario\parsedfeature Class Reference

Public Member Functions

 add_error (string $error)
 Add an error to the current scenario.
 
 add_scenario (string $type, ?string $name)
 Insert a new scenario.
 
 add_step (steprunner $step)
 Add a line to the current scenario.
 
 get_all_steps ()
 Get all the steps form all scenarios.
 
 get_general_error ()
 Get the general error, if any.
 
 get_scenarios ()
 Get the list of scenarios.
 
 is_valid ()
 Check if the parsed feature is valid.
 

Member Function Documentation

◆ add_error()

tool_generator\local\testscenario\parsedfeature::add_error ( string $error)

Add an error to the current scenario.

Parameters
string$error

◆ add_scenario()

tool_generator\local\testscenario\parsedfeature::add_scenario ( string $type,
?string $name )

Insert a new scenario.

Parameters
string$typethe type of the scenario.
string | null$namethe name of the scenario.

◆ add_step()

tool_generator\local\testscenario\parsedfeature::add_step ( steprunner $step)

Add a line to the current scenario.

Parameters
steprunner$stepthe step to add.

◆ get_all_steps()

tool_generator\local\testscenario\parsedfeature::get_all_steps ( )

Get all the steps form all scenarios.

Return values
steprunner[]

◆ get_general_error()

tool_generator\local\testscenario\parsedfeature::get_general_error ( )

Get the general error, if any.

Return values
string

◆ get_scenarios()

tool_generator\local\testscenario\parsedfeature::get_scenarios ( )

Get the list of scenarios.

Return values
stdClass[]array of scenarionum => {type: string, title: string, steps: steprunner[]}

◆ is_valid()

tool_generator\local\testscenario\parsedfeature::is_valid ( )

Check if the parsed feature is valid.

Return values
bool

The documentation for this class was generated from the following file: