Class FieldExpectation

Description

Test for an HTML widget value match.

Located in /libraries/pear/simpletest/web_tester.php (line 23)

SimpleExpectation
   |
   --FieldExpectation
Variable Summary
 mixed $_value
Method Summary
 FieldExpectation FieldExpectation (mixed $value)
 boolean test (mixed $compare)
 string testMessage (mixed $compare)
 boolean _isSingle (mixed $value)
 boolean _testMultiple (mixed $compare)
 boolean _testSingle (mixed $compare)
Variables
mixed $_value (line 24)

Inherited Variables

Inherited from SimpleExpectation

SimpleExpectation::$_dumper
SimpleExpectation::$_message
Methods
Constructor FieldExpectation (line 31)

Sets the field value to compare against.

  • access: public
FieldExpectation FieldExpectation (mixed $value)
  • mixed $value: Test value to match.
test (line 47)

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 110)

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.
_isSingle (line 66)

Tests for valid field comparisons.

  • return: True if integer, string or float.
  • access: private
boolean _isSingle (mixed $value)
  • mixed $value: Value to type check.
_testMultiple (line 92)

List comparison for multivalue field.

  • return: True if matching.
  • access: private
boolean _testMultiple (mixed $compare)
  • mixed $compare: List in any order to test against.
_testSingle (line 76)

String comparison for simple field.

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

Inherited Methods

Inherited From SimpleExpectation

 SimpleExpectation::SimpleExpectation()
 SimpleExpectation::overlayMessage()
 SimpleExpectation::test()
 SimpleExpectation::testMessage()
 SimpleExpectation::_getDumper()

Documentation generated on Fri, 11 Feb 2005 18:14:36 +0000 by phpDocumentor 1.3.0RC3