Moodle  2.2.1
http://www.collinsharper.com
TextExpectation Class Reference
Inheritance diagram for TextExpectation:
Collaboration diagram for TextExpectation:

Public Member Functions

 TextExpectation ($substring, $message= '%s')
 _getSubstring ()
 test ($compare)
 testMessage ($compare)
 _describeTextMatch ($substring, $subject)

Data Fields

 $_substring

Detailed Description

Definition at line 310 of file web_tester.php.


Member Function Documentation

_describeTextMatch ( substring,
subject 
)

Describes a pattern match including the string found and it's position.

Parameters:
string$substringText to search for.
string$subjectSubject to search. protected

Definition at line 369 of file web_tester.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Accessor for the substring.

Returns:
string Text to match. protected

Definition at line 329 of file web_tester.php.

Here is the caller graph for this function:

test ( compare)

Tests the expectation. True if the text contains the substring.

Parameters:
string$compareComparison value.
Returns:
boolean True if correct. public

Reimplemented from SimpleExpectation.

Reimplemented in NoTextExpectation.

Definition at line 340 of file web_tester.php.

Here is the caller graph for this function:

testMessage ( compare)

Returns a human readable test message.

Parameters:
mixed$compareComparison value.
Returns:
string Description of success or failure. public

Reimplemented from SimpleExpectation.

Reimplemented in NoTextExpectation.

Definition at line 351 of file web_tester.php.

Here is the call graph for this function:

TextExpectation ( substring,
message = '%s' 
)

Sets the value to compare against.

Parameters:
string$substringText to search for.
string$messageCustomised message on failure. public

Definition at line 319 of file web_tester.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$_substring

Definition at line 311 of file web_tester.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations