aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework/phpbb_functional_test_case.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-12-22 23:38:05 +0100
committerAndreas Fischer <bantu@phpbb.com>2012-12-22 23:38:05 +0100
commit7829d2a8c8c2969597db412e7689824b0a9e9a9a (patch)
tree8420f3871f1e4ef30259085e1884ba139547e5a2 /tests/test_framework/phpbb_functional_test_case.php
parent7f0fa6477fb61884f115a78b630be8185f86d13d (diff)
parentcc0f6d471f9dd0d035669e408c1b7c53e157bc6e (diff)
downloadforums-7829d2a8c8c2969597db412e7689824b0a9e9a9a.tar
forums-7829d2a8c8c2969597db412e7689824b0a9e9a9a.tar.gz
forums-7829d2a8c8c2969597db412e7689824b0a9e9a9a.tar.bz2
forums-7829d2a8c8c2969597db412e7689824b0a9e9a9a.tar.xz
forums-7829d2a8c8c2969597db412e7689824b0a9e9a9a.zip
Merge remote-tracking branch 'p/ticket/10758-upload' into develop
* p/ticket/10758-upload: [ticket/10758-upload] Mark tests that don't work incomplete. [ticket/10758-upload] Convert error to a failure.
Diffstat (limited to 'tests/test_framework/phpbb_functional_test_case.php')
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index 67a5050892..a051410d7b 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -424,4 +424,20 @@ class phpbb_functional_test_case extends phpbb_test_case
$content = $this->client->getResponse()->getContent();
$this->assertNotContains('Fatal error:', $content);
}
+
+ public function assert_filter($crawler, $expr, $msg = null)
+ {
+ $nodes = $crawler->filter($expr);
+ if ($msg)
+ {
+ $msg .= "\n";
+ }
+ else
+ {
+ $msg = '';
+ }
+ $msg .= "`$expr` not found in DOM.";
+ $this->assertGreaterThan(0, count($nodes), $msg);
+ return $nodes;
+ }
}