Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

TinyMCE HTML plugin custom behat steps definitions.

Copyright: 2023 Matt Porritt <matt.porritt@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 108 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 2 files
 lib/behat/behat_base.php
 lib/editor/tiny/tests/behat/editor_tiny_helpers.php

Defines 1 class

behat_tiny_html:: (3 methods):
  get_javascript_sourcecode_search()
  get_source_code()
  get_multiline_source_code()


Class: behat_tiny_html  - X-Ref

TinyMCE HTML plugin custom behat steps definitions.

get_javascript_sourcecode_search(string $editorid, string $sourcecode)   X-Ref
Get Javascript to navigate to the shadow DOM of the editor,
and find specified sourcecode text.

param: string $editorid The editor id to search within.
param: string $sourcecode The sourcecode to find.
return: string The Javascript to execute.

get_source_code(string $sourcecode, string $locator)   X-Ref
Gets the specified formatted single line source code from the editor
and compares it to what is expected.

param: string $sourcecode The type of element to select (for example `p` or `span`)
param: string $locator The editor to select within

get_multiline_source_code(string $locator, PyStringNode $sourcecode)   X-Ref
Gets the specified formatted multiline source code from the editor
and compares it to what is expected.

param: string $locator
param: PyStringNode $sourcecode
return: void