Skip to content
Snippets Groups Projects
Commit 8c900bf8 authored by pbarroca's avatar pbarroca
Browse files

Debut visiteur DublinCore

parent 813d5a7c
Branches
Tags
No related merge requests found
......@@ -19,78 +19,60 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
abstract class ViewHelperTestCase extends PHPUnit_Framework_TestCase {
public function assertQueryContentContains($html, $path, $match, $message = '') {
$constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path);
if (!$constraint->evaluate($html, __FUNCTION__, $match)) {
$constraint->fail($path, $message);
}
public function assertQueryContentContains() {
call_user_func_array(array(new Storm_Test_XPath(), __FUNCTION__),
func_get_args());
}
public function assertNotQueryContentContains($html, $path, $match, $message = '') {
$constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path);
if (!$constraint->evaluate($html, __FUNCTION__, $match)) {
$constraint->fail($path, $message);
}
public function assertNotQueryContentContains() {
call_user_func_array(array(new Storm_Test_XPath(), __FUNCTION__),
func_get_args());
}
public function assertXpath($html, $path, $message = '') {
$constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path);
if (!$constraint->evaluate($html, __FUNCTION__)) {
$constraint->fail($path, $message);
}
public function assertXpath() {
call_user_func_array(array(new Storm_Test_XPath(), __FUNCTION__),
func_get_args());
}
public function assertNotXpath($html, $path, $message = '') {
$constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path);
if (!$constraint->evaluate($html, __FUNCTION__)) {
$constraint->fail($path, $message);
}
public function assertNotXpath() {
call_user_func_array(array(new Storm_Test_XPath(), __FUNCTION__),
func_get_args());
}
public function assertXpathContentContains($html, $path, $match, $message = '') {
$constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path);
if (!$constraint->evaluate($html, __FUNCTION__, $match)) {
$constraint->fail($path, $message);
}
public function assertXpathContentContains() {
call_user_func_array(array(new Storm_Test_XPath(), __FUNCTION__),
func_get_args());
}
public function assertNotXpathContentContains($html, $path, $match, $message = '') {
$constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path);
if (!$constraint->evaluate($html, __FUNCTION__, $match)) {
$constraint->fail($path, $message);
}
public function assertNotXpathContentContains() {
call_user_func_array(array(new Storm_Test_XPath(), __FUNCTION__),
func_get_args());
}
public function assertQueryCount($html, $path, $count, $message = '')
{
$constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path);
if (!$constraint->evaluate($html, __FUNCTION__, $count)) {
$constraint->fail($path, $message);
}
}
public function assertQueryCount() {
call_user_func_array(array(new Storm_Test_XPath(), __FUNCTION__),
func_get_args());
}
/**
* @param string $html
* @param array $paths
* @param string $message
*/
public function assertAnyXpath($html, array $paths, $message = '') {
foreach ($paths as $path) {
$constraint = new Zend_Test_PHPUnit_Constraint_DomQuery($path);
if ($constraint->evaluate($html, 'assertXpath')) {
return;
}
}
public function assertAnyXpath() {
call_user_func_array(array(new Storm_Test_XPath(), __FUNCTION__),
func_get_args());
$this->fail("Failed asserting any path from (\n\t" . implode(", \n\t", $paths)
. ') EXISTS' . "\n" . $message);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment