Class FieldExpectation

Description

Test for an HTML widget value match.

Located in /web_tester.php (line 23)

SimpleExpectation
   |
   --FieldExpectation
Method Summary
 FieldExpectation __construct (mixed $value, [string $message = '%s'])
 boolean isSingle (mixed $value)
 boolean test (mixed $compare)
 string testMessage (mixed $compare)
 boolean testMultiple (mixed $compare)
 boolean testSingle (mixed $compare)
Variables

Inherited Variables

Inherited from SimpleExpectation

SimpleExpectation::$dumper
Methods
Constructor __construct (line 34)

Sets the field value to compare against.

  • access: public
FieldExpectation __construct (mixed $value, [string $message = '%s'])
  • mixed $value: Test value to match. Can be an expectation for say pattern matching.
  • string $message: Optiona message override. Can use %s as a placeholder for the original message.

Redefinition of:
SimpleExpectation::__construct()
Creates a dumper for displaying values and sets the test message.
isSingle (line 69)

Tests for valid field comparisons with a single option.

  • return: True if integer, string or float.
  • access: protected
boolean isSingle (mixed $value)
  • mixed $value: Value to type check.
test (line 50)

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

  • return: True if correct.
  • access: public
boolean test (mixed $compare)
  • mixed $compare: Comparison value. False for an unset field.

Redefinition of:
SimpleExpectation::test()
Tests the expectation. True if correct.
testMessage (line 113)

Returns a human readable test message.

  • return: Description of success or failure.
  • access: public
string testMessage (mixed $compare)
  • mixed $compare: Comparison value.

Redefinition of:
SimpleExpectation::testMessage()
Returns a human readable test message.
testMultiple (line 95)

List comparison for multivalue field.

  • return: True if matching.
  • access: protected
boolean testMultiple (mixed $compare)
  • mixed $compare: List in any order to test against.
testSingle (line 79)

String comparison for simple field with a single option.

  • return: True if matching.
  • access: protected
boolean testSingle (mixed $compare)
  • mixed $compare: String to test against.

Inherited Methods

Inherited From SimpleExpectation

 SimpleExpectation::__construct()
 SimpleExpectation::getDumper()
 SimpleExpectation::isExpectation()
 SimpleExpectation::overlayMessage()
 SimpleExpectation::test()
 SimpleExpectation::testMessage()

Documentation generated on Sun, 31 Oct 2010 16:33:03 -0500 by phpDocumentor 1.4.3