Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
nasty_strings Class Reference

Static Public Member Functions

static get ($key)
 Returns a nasty string and stores the key mapping. More...
 
static reset_used_strings ()
 Resets the used strings var. More...
 

Static Protected Member Functions

static random_index ()
 Returns a random index. More...
 

Static Protected Attributes

static array $strings
 List of different strings to fill fields and assert against them. More...
 
static array $usedstrings = array()
 Already used nasty strings. More...
 

Member Function Documentation

◆ get()

static nasty_strings::get (   $key)
static

Returns a nasty string and stores the key mapping.

Parameters
string$keyThe key
Return values
string

◆ random_index()

static nasty_strings::random_index ( )
staticprotected

Returns a random index.

Return values
int

◆ reset_used_strings()

static nasty_strings::reset_used_strings ( )
static

Resets the used strings var.

Return values
void

Member Data Documentation

◆ $strings

array nasty_strings::$strings
staticprotected
Initial value:
= array(
'< > & &lt; &gt; &amp; ' \" '$@NULL@$ @@TEST@@ \\" \ , ; : . 日本語­% %%',
'&amp; ' \" '$@NULL@$ < > & &lt; &gt; @@TEST@@ \\" \ , ; : . 日本語­% %%',
'< > & &lt; &gt; &amp; ' \" \\" \ , ; : . \'$@NULL@$ @@TEST@@ 日本語­% %%',
'< > & &lt; &gt; &amp; ' \" '$@NULL@$ 日本語­% %%@@TEST@@ . \\" \ , ; :',
'< > & &lt; &gt; \\" \ , ; : . 日本語&amp; ' \" '$@NULL@$ @@TEST@@­% %%',
'\' \" '$@NULL@$ @@TEST@@ < > & &lt; &gt; &amp; \\" \ , ; : . 日本語­% %%',
'\\\" \ , ; : . 日本語­% < > & &lt; &gt; &amp; ' \" '$@NULL@$ @@TEST@@ %%',
'< > & &lt; &gt; &amp; ' \" '$@NULL@$ 日本語­% %% @@TEST@@ \\" \ . , ; :',
'. 日本語&amp; ' \" < > & &lt; &gt; \ , ; : '$@NULL@$ \\" @@TEST@@­% %%',
'&amp; ' \" < > & &lt; &gt; \\" \ , ; : . 日本語\'$@NULL@$ @@TEST@@­% %%',
)

List of different strings to fill fields and assert against them.

Non of these strings can be a part of another one, this would not be good when using more one string at the same time and asserting results.

◆ $usedstrings

array nasty_strings::$usedstrings = array()
staticprotected

Already used nasty strings.

This array will be cleaned before each scenario.


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