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

Public Member Functions

 FieldExpectation ($value, $message= '%s')
 test ($compare)
 _isSingle ($value)
 _testSingle ($compare)
 _testMultiple ($compare)
 testMessage ($compare)

Data Fields

 $_value

Detailed Description

Definition at line 23 of file web_tester.php.


Member Function Documentation

_isSingle ( value)

Tests for valid field comparisons with a single option.

Parameters:
mixed$valueValue to type check.
Returns:
boolean True if integer, string or float. private

Definition at line 69 of file web_tester.php.

Here is the caller graph for this function:

_testMultiple ( compare)

List comparison for multivalue field.

Parameters:
mixed$compareList in any order to test against.
Returns:
boolean True if matching. private

Definition at line 95 of file web_tester.php.

Here is the caller graph for this function:

_testSingle ( compare)

String comparison for simple field with a single option.

Parameters:
mixed$compareString to test against.
Returns:
boolean True if matching. private

Definition at line 79 of file web_tester.php.

Here is the call graph for this function:

Here is the caller graph for this function:

FieldExpectation ( value,
message = '%s' 
)

Sets the field value to compare against.

Parameters:
mixed$valueTest value to match. Can be an expectation for say pattern matching.
string$messageOptiona message override. Can use s as a placeholder for the original message. public

Definition at line 34 of file web_tester.php.

Here is the call graph for this function:

test ( compare)

Tests the expectation. True if it matches a string value or an array value in any order.

Parameters:
mixed$compareComparison value. False for an unset field.
Returns:
boolean True if correct. public

Reimplemented from SimpleExpectation.

Definition at line 50 of file web_tester.php.

Here is the call graph for this function:

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.

Definition at line 113 of file web_tester.php.

Here is the call graph for this function:


Field Documentation

$_value

Definition at line 24 of file web_tester.php.


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