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

Public Member Functions

 __construct ($tag, $expectedvalues, $forbiddenvalues=array(), $message= '%s')
 test ($html)
 customMessage ($html)

Protected Attributes

 $tag
 $expectedvalues = array()
 $forbiddenvalues = array()
 $failurereason = 'nomatch'

Detailed Description

An Expectation that looks to see whether some HMTL contains a tag with an array of attributes. All attributes must be present and their values must match the expected values. A third parameter can be used to specify attribute=>value pairs which must not be present in a positive match.

Definition at line 268 of file simpletestlib.php.


Constructor & Destructor Documentation

__construct ( tag,
expectedvalues,
forbiddenvalues = array(),
message = '%s' 
)

Definition at line 286 of file simpletestlib.php.


Member Function Documentation

customMessage ( html)

Reimplemented in DoesNotContainTagWithAttributes.

Definition at line 340 of file simpletestlib.php.

test ( compare)

Tests the expectation. True if correct.

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

Reimplemented from SimpleExpectation.

Reimplemented in DoesNotContainTagWithAttributes.

Definition at line 293 of file simpletestlib.php.

Here is the call graph for this function:


Field Documentation

$expectedvalues = array() [protected]

Definition at line 276 of file simpletestlib.php.

$failurereason = 'nomatch' [protected]

Definition at line 284 of file simpletestlib.php.

$forbiddenvalues = array() [protected]

Definition at line 280 of file simpletestlib.php.

$tag [protected]

Definition at line 272 of file simpletestlib.php.


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