Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Zend_Dom_Query-based PHPUnit Constraint
ASSERT_QUERY = 'assertQuery'
ASSERT_CONTENT_CONTAINS = 'assertQueryContentContains'
ASSERT_CONTENT_REGEX = 'assertQueryContentRegex'
ASSERT_CONTENT_COUNT = 'assertQueryCount'
ASSERT_CONTENT_COUNT_MIN = 'assertQueryCountMin'
ASSERT_CONTENT_COUNT_MAX = 'assertQueryCountMax'
string $_assertType = 'null'
Current assertion type
array $_assertTypes = 'array'
Available assertion types
string $_content = 'null'
Content being matched
bool $_negate = 'false'
Whether or not assertion is negated
string $_path = 'null'
CSS selector or XPath path to select against
bool $_useXpath = 'false'
Whether or not to use XPath when querying
__construct(
string $path
)
:
void
Constructor; setup constraint state
_countContent(
Zend_Dom_Query_Result $result, int $test, string $type
)
:
boolean
Determine if content count matches criteria
_getNodeContent(
DOMNode $node
)
:
string
Get node content, minus node markup tags
_matchContent(
Zend_Dom_Query_Result $result, string $match
)
:
bool
Check to see if content is matched in selected nodes
_notMatchContent(
Zend_Dom_Query_Result $result, string $match
)
:
bool
Check to see if content is NOT matched in selected nodes
_notRegexContent(
Zend_Dom_Query_Result $result, string $pattern
)
:
bool
Check to see if content is NOT matched by regex in selected nodes
_regexContent(
Zend_Dom_Query_Result $result, string $pattern
)
:
bool
Check to see if content is matched by regex in selected nodes
evaluate(
string $other, null|string $assertType
=
null
)
:
bool
Evaluate an object to see if it fits the constraints
fail(
mixed $other, string $description, bool $not
=
false
)
:
void
Report Failure
setNegate(
bool $flag
=
true
)
:
void
Indicate negative match
setUseXpath(
bool $flag
=
true
)
:
Zend_Test_PHPUnit_Constraint_DomQuery
Whether or not path is a straight XPath expression
toString(
)
:
string
Complete implementation