Test/PHPUnit/Constraint/DomQuery.php
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.
- category
- Zend
- copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Test
- subpackage
- PHPUnit
- version
- $Id: DomQuery.php 23775 2011-03-01 17:25:24Z ralph $
\Zend_Test_PHPUnit_Constraint_DomQuery
Zend_Dom_Query-based PHPUnit Constraint
- Extends from
- \PHPUnit_Framework_Constraint
- category
- Zend
- copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Test
- subpackage
- PHPUnit
- uses
- \PHPUnit_Framework_Constraint
Constants
Properties



array
$_assertTypes= 'array'
Available assertion types
Default valuearray
Details
- Type
- array



bool
$_negate= 'false'
Whether or not assertion is negated
Default valuefalse
Details
- Type
- bool



string
$_path= 'null'
CSS selector or XPath path to select against
Default valuenull
Details
- Type
- string



bool
$_useXpath= 'false'
Whether or not to use XPath when querying
Default valuefalse
Details
- Type
- bool
Methods



__construct(
string $path
)
:
void
Constructor; setup constraint state
Parameters
Name |
Type |
Description |
$path |
string |
CSS selector path |



_countContent(
\Zend_Dom_Query_Result $result, int $test, string $type
)
:
boolean
Determine if content count matches criteria
Parameters
Name |
Type |
Description |
$result |
\Zend_Dom_Query_Result |
|
$test |
int |
Value against which to test |
$type |
string |
assertion type |
Returns



evaluate(
string $other, null|string $assertType
=
null
)
:
bool
Evaluate an object to see if it fits the constraints
Parameters
Name |
Type |
Description |
$other |
string |
String to examine |
$assertType |
null|string |
Assertion type |
Returns



registerXpathNamespaces(
array $xpathNamespaces
)
:
void
Register XPath namespaces
Parameters
Name |
Type |
Description |
$xpathNamespaces |
array |
|