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

Public Member Functions

 WithinMarginExpectation ($value, $margin, $message= '%s')
 test ($compare)
 testMessage ($compare)
 _withinMessage ($compare)
 _outsideMessage ($compare)

Data Fields

 $_upper
 $_lower

Detailed Description

Definition at line 328 of file expectation.php.


Member Function Documentation

_outsideMessage ( compare)

Creates a the message for being within the range.

Parameters:
mixed$compareValue being tested. private

Definition at line 387 of file expectation.php.

Here is the caller graph for this function:

_withinMessage ( compare)

Creates a the message for being within the range.

Parameters:
mixed$compareValue being tested. private

Definition at line 377 of file expectation.php.

Here is the caller graph for this function:

test ( compare)

Tests the expectation. True if it matches the held value.

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

Reimplemented from SimpleExpectation.

Reimplemented in OutsideMarginExpectation.

Definition at line 353 of file expectation.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 OutsideMarginExpectation.

Definition at line 364 of file expectation.php.

Here is the call graph for this function:

WithinMarginExpectation ( value,
margin,
message = '%s' 
)

Sets the value to compare against and the fuzziness of the match. Used for comparing floating point values.

Parameters:
mixed$valueTest value to match.
mixed$marginFuzziness of match.
string$messageCustomised message on failure. public

Definition at line 340 of file expectation.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$_lower

Definition at line 330 of file expectation.php.

$_upper

Definition at line 329 of file expectation.php.


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