Class CssSelectorExpectation

Description

CssSelectorExpectation

Create a CSS Selector expectation

Located in /extensions/dom_tester.php (line 28)

SimpleExpectation
   |
   --CssSelectorExpectation
Variable Summary
 mixed $_dom
 mixed $_selector
 mixed $_value
Method Summary
 CssSelectorExpectation CssSelectorExpectation (mixed $dom, string $selector, [string $message = '%s'])
 boolean test (mixed $compare)
 string testMessage (mixed $compare)
 string _normalizeSelector (string $selector)
Variables
mixed $_dom (line 29)
mixed $_selector (line 30)
mixed $_value (line 31)

Inherited Variables

Inherited from SimpleExpectation

SimpleExpectation::$_dumper
SimpleExpectation::$_message
Methods
Constructor CssSelectorExpectation (line 40)

Sets the dom tree and the css selector to compare against

  • access: public
CssSelectorExpectation CssSelectorExpectation (mixed $dom, string $selector, [string $message = '%s'])
  • mixed $dom: Dom tree to search into.
  • string $selector: Css selector to match element.
  • string $message: Customised message on failure.
test (line 67)

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

  • return: True if correct.
  • access: public
boolean test (mixed $compare)
  • mixed $compare: Comparison value.

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

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.
_normalizeSelector (line 56)

Normalizes the selector. In particular, replaces single-quotes with double-quotes.

  • return: Normalized Css selector.
  • access: public
string _normalizeSelector (string $selector)
  • string $selector: Css selector to match element.

Inherited Methods

Inherited From SimpleExpectation

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

Documentation generated on Sun, 04 May 2008 09:21:26 -0500 by phpDocumentor 1.3.0