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'
Details ASSERT_CONTENT_CONTAINS = 'assertQueryContentContains'
Details ASSERT_CONTENT_REGEX = 'assertQueryContentRegex'
Details ASSERT_CONTENT_COUNT = 'assertQueryCount'
Details ASSERT_CONTENT_COUNT_MIN = 'assertQueryCountMin'
Details ASSERT_CONTENT_COUNT_MAX = 'assertQueryCountMax'
Detailsstring $_assertType = 'null'Current assertion type
Detailsarray $_assertTypes = 'array'Available assertion types
Detailsstring $_content = 'null'Content being matched
Detailsbool $_negate = 'false'Whether or not assertion is negated
Detailsstring $_path = 'null'CSS selector or XPath path to select against
Detailsbool $_useXpath = 'false'Whether or not to use XPath when querying
Details__construct(
string $path
)
:
voidConstructor; setup constraint state
Details_countContent(
Zend_Dom_Query_Result $result, int $test, string $type
)
:
booleanDetermine if content count matches criteria
Details_getNodeContent(
DOMNode $node
)
:
stringGet node content, minus node markup tags
Details_matchContent(
Zend_Dom_Query_Result $result, string $match
)
:
boolCheck to see if content is matched in selected nodes
Details_notMatchContent(
Zend_Dom_Query_Result $result, string $match
)
:
boolCheck to see if content is NOT matched in selected nodes
Details_notRegexContent(
Zend_Dom_Query_Result $result, string $pattern
)
:
boolCheck to see if content is NOT matched by regex in selected nodes
Details_regexContent(
Zend_Dom_Query_Result $result, string $pattern
)
:
boolCheck to see if content is matched by regex in selected nodes
Detailsevaluate(
string $other, null|string $assertType
=
null
)
:
boolEvaluate an object to see if it fits the constraints
Detailsfail(
mixed $other, string $description, bool $not
=
false
)
:
voidReport Failure
DetailssetNegate(
bool $flag
=
true
)
:
voidIndicate negative match
DetailssetUseXpath(
bool $flag
=
true
)
:
Zend_Test_PHPUnit_Constraint_DomQueryWhether or not path is a straight XPath expression
DetailstoString(
)
:
stringComplete implementation
Details