|
| __construct ($name, $description, array $parameters, OutputPrinter $printer) |
| Initializes formatter.
|
|
| afterStep (AfterStepTested $event) |
| Take screenshot after step is executed.
|
|
| beforeScenario (BeforeScenarioTested $event) |
| Reset currentscenariostepcount.
|
|
| beforeStep (BeforeStepTested $event) |
| Increment currentscenariostepcount.
|
|
| getDescription () |
| Returns formatter description.
|
|
| getName () |
| Returns formatter name.
|
|
| getOutputPrinter () |
| Returns formatter output printer.
|
|
| getParameter ($name) |
| Returns parameter name.
|
|
| setParameter ($name, $value) |
| Sets formatter parameter.
|
|
|
static | getSubscribedEvents () |
| Returns an array of event names this subscriber wants to listen to.
|
|
|
| get_faildump_filename (AfterStepTested $event, $filetype) |
| Determine the full pathname to store a failure-related dump.
|
|
| get_run_screenshot_dir () |
| Return screenshot directory where all screenshots will be saved.
|
|
| take_contentdump (AfterStepTested $event, $context) |
| Take a dump of the page content when a step fails.
|
|
| take_screenshot (AfterStepTested $event, $context) |
| Take screenshot when a step fails.
|
|
|
static int | $currentscenariocount = 0 |
| The scenario count.
|
|
static int | $currentscenariostepcount = 0 |
| The step count within the current scenario.
|
|
static The | $faildumpdirname = false |
| If we are saving any kind of dump on failure we should use the same parent dir during a run.
|
|
◆ __construct()
Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::__construct |
( |
| $name, |
|
|
| $description, |
|
|
array | $parameters, |
|
|
OutputPrinter | $printer ) |
Initializes formatter.
- Parameters
-
string | $name | |
string | $description | |
array | $parameters | |
OutputPrinter | $printer | |
◆ afterStep()
Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::afterStep |
( |
AfterStepTested | $event | ) |
|
Take screenshot after step is executed.
Behat\Behat\Event\html
- Parameters
-
◆ beforeScenario()
Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::beforeScenario |
( |
BeforeScenarioTested | $event | ) |
|
Reset currentscenariostepcount.
- Parameters
-
BeforeScenarioTested | $event | |
◆ beforeStep()
Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::beforeStep |
( |
BeforeStepTested | $event | ) |
|
Increment currentscenariostepcount.
- Parameters
-
◆ get_faildump_filename()
Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::get_faildump_filename |
( |
AfterStepTested | $event, |
|
|
| $filetype ) |
|
protected |
Determine the full pathname to store a failure-related dump.
This is used for content such as the DOM, and screenshots.
- Parameters
-
AfterStepTested | $event | |
String | $filetype | The file suffix to use. Limited to 4 chars. |
◆ get_run_screenshot_dir()
Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::get_run_screenshot_dir |
( |
| ) |
|
|
protected |
Return screenshot directory where all screenshots will be saved.
- Return values
-
◆ getDescription()
Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::getDescription |
( |
| ) |
|
Returns formatter description.
- Return values
-
◆ getName()
Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::getName |
( |
| ) |
|
Returns formatter name.
- Return values
-
◆ getOutputPrinter()
Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::getOutputPrinter |
( |
| ) |
|
Returns formatter output printer.
- Return values
-
◆ getParameter()
Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::getParameter |
( |
| $name | ) |
|
Returns parameter name.
- Parameters
-
- Return values
-
◆ getSubscribedEvents()
static Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::getSubscribedEvents |
( |
| ) |
|
|
static |
Returns an array of event names this subscriber wants to listen to.
- Return values
-
array | The event names to listen to |
◆ setParameter()
Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::setParameter |
( |
| $name, |
|
|
| $value ) |
Sets formatter parameter.
- Parameters
-
◆ take_contentdump()
Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::take_contentdump |
( |
AfterStepTested | $event, |
|
|
| $context ) |
|
protected |
Take a dump of the page content when a step fails.
- Exceptions
-
- Parameters
-
AfterStepTested | $event | |
Behat\Context\Context\Context | $context | |
◆ take_screenshot()
Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::take_screenshot |
( |
AfterStepTested | $event, |
|
|
| $context ) |
|
protected |
Take screenshot when a step fails.
- Exceptions
-
- Parameters
-
AfterStepTested | $event | |
Context | $context | |
◆ $faildumpdirname
The Moodle\BehatExtension\Output\Formatter\MoodleScreenshotFormatter::$faildumpdirname = false |
|
staticprotected |
If we are saving any kind of dump on failure we should use the same parent dir during a run.
parent dir name
The documentation for this class was generated from the following file:
- lib/behat/extension/Moodle/BehatExtension/Output/Formatter/MoodleScreenshotFormatter.php