Zend_Dom_Query-based PHPUnit Constraint
uses | |
---|---|
category | Zend |
package | Zend_Test |
subpackage | PHPUnit |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__construct(string $path) : void
string
CSS selector path
evaluate($content, $assertType= ''
, $match= FALSE
) : boolean
boolean
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 onefail($other, $description, \PHPUnit_Framework_ComparisonFailure $cannot_be_used = NULL
) : void
see | for implementation details |
---|
\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(array $xpathNamespaces) : void
array
setNegate(boolean $flag = true
) : void
boolean
setUseXpath(boolean $flag = true
) : \Zend_Test_PHPUnit_Constraint_DomQuery
boolean
\Zend_Test_PHPUnit_Constraint_DomQuery
toString() : string
string
_countContent(\Zend_Dom_Query_Result $result, integer $test, string $type) : boolean
\Zend_Dom_Query_Result
integer
Value against which to test
string
assertion type
boolean
_getNodeContent(\DOMNode $node) : string
\DOMNode
string
_matchContent(\Zend_Dom_Query_Result $result, string $match) : boolean
\Zend_Dom_Query_Result
string
Content to match
boolean
_notMatchContent(\Zend_Dom_Query_Result $result, string $match) : boolean
\Zend_Dom_Query_Result
string
boolean
_notRegexContent(\Zend_Dom_Query_Result $result, string $pattern) : boolean
\Zend_Dom_Query_Result
string
boolean
_regexContent(\Zend_Dom_Query_Result $result, string $pattern) : boolean
\Zend_Dom_Query_Result
string
boolean
$_assertType : string
null
$_assertTypes : array
array(self::ASSERT_QUERY, self::ASSERT_CONTENT_CONTAINS, self::ASSERT_CONTENT_REGEX, self::ASSERT_CONTENT_COUNT, self::ASSERT_CONTENT_COUNT_MIN, self::ASSERT_CONTENT_COUNT_MAX)
$_content : string
null
$_negate : boolean
false
$_path : string
null
$_useXpath : boolean
false
$_xpathNamespaces : array
array()
ASSERT_CONTENT_CONTAINS = 'assertQueryContentContains'
ASSERT_CONTENT_COUNT = 'assertQueryCount'
ASSERT_CONTENT_COUNT_MAX = 'assertQueryCountMax'
ASSERT_CONTENT_COUNT_MIN = 'assertQueryCountMin'
ASSERT_CONTENT_REGEX = 'assertQueryContentRegex'
ASSERT_QUERY = 'assertQuery'