diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-20 20:27:59 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-20 20:42:06 -0500 |
commit | b6f40f7c33a4cdb4a31af6374b2b1fd7c13deb08 (patch) | |
tree | 4c40f0149d8cbd03879d6e87c182f955e8b87b78 /tests/test_framework/phpbb_functional_test_case.php | |
parent | 31b5f91ea1547a48a1982e73da961b1ef1afab01 (diff) | |
download | forums-b6f40f7c33a4cdb4a31af6374b2b1fd7c13deb08.tar forums-b6f40f7c33a4cdb4a31af6374b2b1fd7c13deb08.tar.gz forums-b6f40f7c33a4cdb4a31af6374b2b1fd7c13deb08.tar.bz2 forums-b6f40f7c33a4cdb4a31af6374b2b1fd7c13deb08.tar.xz forums-b6f40f7c33a4cdb4a31af6374b2b1fd7c13deb08.zip |
[ticket/10758-upload] Convert error to a failure.
PHPBB3-10758
Diffstat (limited to 'tests/test_framework/phpbb_functional_test_case.php')
-rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 16 |
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; + } } |