Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 403]

(no description)

File Size: 295 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

MoodleScreenshotFormatter:: (14 methods):
  __construct()
  getSubscribedEvents()
  getName()
  getDescription()
  getOutputPrinter()
  setParameter()
  getParameter()
  beforeScenario()
  beforeStep()
  afterStep()
  get_run_screenshot_dir()
  take_screenshot()
  take_contentdump()
  get_faildump_filename()


Class: MoodleScreenshotFormatter  - X-Ref

Feature step counter for distributing features between parallel runs.

Use it with --dry-run (and any other selectors combination) to
get the results quickly.

__construct($name, $description, array $parameters, OutputPrinter $printer)   X-Ref
Initializes formatter.

param: string        $name
param: string        $description
param: array         $parameters
param: OutputPrinter $printer

getSubscribedEvents()   X-Ref
Returns an array of event names this subscriber wants to listen to.

return: array The event names to listen to

getName()   X-Ref
Returns formatter name.

return: string

getDescription()   X-Ref
Returns formatter description.

return: string

getOutputPrinter()   X-Ref
Returns formatter output printer.

return: OutputPrinter

setParameter($name, $value)   X-Ref
Sets formatter parameter.

param: string $name
param: mixed  $value

getParameter($name)   X-Ref
Returns parameter name.

param: string $name
return: mixed

beforeScenario(BeforeScenarioTested $event)   X-Ref
Reset currentscenariostepcount

param: BeforeScenarioTested $event

beforeStep(BeforeStepTested $event)   X-Ref
Increment currentscenariostepcount

param: BeforeStepTested $event

afterStep(AfterStepTested $event)   X-Ref
Take screenshot after step is executed.    Behat\Behat\Event\html

param: AfterStepTested $event

get_run_screenshot_dir()   X-Ref
Return screenshot directory where all screenshots will be saved.

return: string

take_screenshot(AfterStepTested $event, $context)   X-Ref
Take screenshot when a step fails.

param: AfterStepTested $event
param: Context $context

take_contentdump(AfterStepTested $event, $context)   X-Ref
Take a dump of the page content when a step fails.

param: AfterStepTested $event
param: \Behat\Context\Context\Context $context

get_faildump_filename(AfterStepTested $event, $filetype)   X-Ref
Determine the full pathname to store a failure-related dump.

This is used for content such as the DOM, and screenshots.

param: AfterStepTested $event
param: String $filetype The file suffix to use. Limited to 4 chars.