Zend Framework
1.12
|
Public Member Functions | |
__construct ($path) | |
Constructor; setup constraint state. | |
setNegate ($flag=true) | |
Indicate negative match. | |
setUseXpath ($flag=true) | |
Whether or not path is a straight XPath expression. | |
evaluate ($other, $assertType=null) | |
Evaluate an object to see if it fits the constraints. | |
fail ($other, $description, $not=false) | |
Report Failure. | |
toString () | |
Complete implementation. | |
registerXpathNamespaces ($xpathNamespaces) | |
Register XPath namespaces. | |
__construct ($path) | |
Constructor; setup constraint state. | |
setNegate ($flag=true) | |
Indicate negative match. | |
setUseXpath ($flag=true) | |
Whether or not path is a straight XPath expression. | |
evaluate ($content, $assertType= '', $match=FALSE) | |
Evaluate an object to see if it fits the constraints. | |
fail ($other, $description, PHPUnit_Framework_ComparisonFailure $cannot_be_used=NULL) | |
Report Failure. | |
toString () | |
Complete implementation. | |
registerXpathNamespaces ($xpathNamespaces) | |
Register XPath namespaces. | |
Public Attributes | |
const | ASSERT_QUERY = 'assertQuery' |
#@+ Assertion type constants | |
const | ASSERT_CONTENT_CONTAINS = 'assertQueryContentContains' |
const | ASSERT_CONTENT_REGEX = 'assertQueryContentRegex' |
const | ASSERT_CONTENT_COUNT = 'assertQueryCount' |
const | ASSERT_CONTENT_COUNT_MIN = 'assertQueryCountMin' |
const | ASSERT_CONTENT_COUNT_MAX = 'assertQueryCountMax' |
Protected Member Functions | |
_matchContent ($result, $match) | |
Check to see if content is matched in selected nodes. | |
_notMatchContent ($result, $match) | |
Check to see if content is NOT matched in selected nodes. | |
_regexContent ($result, $pattern) | |
Check to see if content is matched by regex in selected nodes. | |
_notRegexContent ($result, $pattern) | |
Check to see if content is NOT matched by regex in selected nodes. | |
_countContent ($result, $test, $type) | |
Determine if content count matches criteria. | |
_getNodeContent (DOMNode $node) | |
Get node content, minus node markup tags. | |
_matchContent ($result, $match) | |
Check to see if content is matched in selected nodes. | |
_notMatchContent ($result, $match) | |
Check to see if content is NOT matched in selected nodes. | |
_regexContent ($result, $pattern) | |
Check to see if content is matched by regex in selected nodes. | |
_notRegexContent ($result, $pattern) | |
Check to see if content is NOT matched by regex in selected nodes. | |
_countContent ($result, $test, $type) | |
Determine if content count matches criteria. | |
_getNodeContent (DOMNode $node) | |
Get node content, minus node markup tags. | |
Protected Attributes | |
$_assertType = null | |
$_assertTypes | |
$_content = null | |
$_negate = false | |
$_path = null | |
$_useXpath = false | |
$_xpathNamespaces = array() | |
__construct | ( | $path | ) |
Constructor; setup constraint state.
string | $path | CSS selector path |
__construct | ( | $path | ) |
Constructor; setup constraint state.
string | $path | CSS selector path |
|
protected |
Determine if content count matches criteria.
Zend_Dom_Query_Result | $result | |
int | $test | Value against which to test |
string | $type | assertion type |
|
protected |
Determine if content count matches criteria.
Zend_Dom_Query_Result | $result | |
int | $test | Value against which to test |
string | $type | assertion type |
|
protected |
Get node content, minus node markup tags.
DOMNode | $node |
|
protected |
Get node content, minus node markup tags.
DOMNode | $node |
|
protected |
Check to see if content is matched in selected nodes.
Zend_Dom_Query_Result | $result | |
string | $match | Content to match |
|
protected |
Check to see if content is matched in selected nodes.
Zend_Dom_Query_Result | $result | |
string | $match | Content to match |
|
protected |
Check to see if content is NOT matched in selected nodes.
Zend_Dom_Query_Result | $result | |
string | $match |
|
protected |
Check to see if content is NOT matched in selected nodes.
Zend_Dom_Query_Result | $result | |
string | $match |
|
protected |
Check to see if content is NOT matched by regex in selected nodes.
Zend_Dom_Query_Result | $result | |
string | $pattern |
|
protected |
Check to see if content is NOT matched by regex in selected nodes.
Zend_Dom_Query_Result | $result | |
string | $pattern |
|
protected |
Check to see if content is matched by regex in selected nodes.
Zend_Dom_Query_Result | $result | |
string | $pattern |
|
protected |
Check to see if content is matched by regex in selected nodes.
Zend_Dom_Query_Result | $result | |
string | $pattern |
evaluate | ( | $other, | |
$assertType = null |
|||
) |
Evaluate an object to see if it fits the constraints.
string | $other | String to examine |
null|string | Assertion type |
evaluate | ( | $content, | |
$assertType = '' , |
|||
$match = FALSE |
|||
) |
Evaluate an object to see if it fits the constraints.
string | Response content to be matched against (haystack) |
null|string | Assertion type |
string | (optional) String to match (needle), may be required depending on assertion type |
NOTE: Drastic changes up to PHPUnit 3.5.15 this was: public function evaluate($other, $assertType = null) In PHPUnit 3.6.0 they changed the interface into this: public function evaluate($other, $description = '', $returnResult = FALSE) We use the new interface for PHP-strict checking, but emulate the old one
fail | ( | $other, | |
$description, | |||
$not = false |
|||
) |
Report Failure.
mixed | $other | CSS selector path |
string | $description | |
bool | $not |
PHPUnit_Framework_ExpectationFailedException |
fail | ( | $other, | |
$description, | |||
PHPUnit_Framework_ComparisonFailure | $cannot_be_used = NULL |
||
) |
Report Failure.
mixed | CSS selector path |
string | Failure description |
object | Cannot be used, null |
PHPUnit_Framework_ExpectationFailedException | NOTE: Drastic changes up to PHPUnit 3.5.15 this was: public function fail($other, $description, $not = false) In PHPUnit 3.6.0 they changed the interface into this: protected function fail($other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL) We use the new interface for PHP-strict checking |
registerXpathNamespaces | ( | $xpathNamespaces | ) |
Register XPath namespaces.
array | $xpathNamespaces |
registerXpathNamespaces | ( | $xpathNamespaces | ) |
Register XPath namespaces.
array | $xpathNamespaces |
setNegate | ( | $flag = true | ) |
Indicate negative match.
bool | $flag |
setNegate | ( | $flag = true | ) |
Indicate negative match.
bool | $flag |
setUseXpath | ( | $flag = true | ) |
Whether or not path is a straight XPath expression.
bool | $flag |
setUseXpath | ( | $flag = true | ) |
Whether or not path is a straight XPath expression.
bool | $flag |
toString | ( | ) |
Complete implementation.
toString | ( | ) |
Complete implementation.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const ASSERT_CONTENT_CONTAINS = 'assertQueryContentContains' |
const ASSERT_CONTENT_COUNT = 'assertQueryCount' |
const ASSERT_CONTENT_COUNT_MAX = 'assertQueryCountMax' |
const ASSERT_CONTENT_COUNT_MIN = 'assertQueryCountMin' |
const ASSERT_CONTENT_REGEX = 'assertQueryContentRegex' |
const ASSERT_QUERY = 'assertQuery' |
#@+ Assertion type constants