diff options
author | Andreas Fischer <bantu@phpbb.com> | 2015-06-16 14:24:35 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2015-06-16 14:24:35 +0200 |
commit | 65d44923b42d93f28b407f7e7cb9041cf154490c (patch) | |
tree | b5e979c3f6424c634f684b4cda7b35bf8b35ef89 /tests/test_framework/phpbb_functional_test_case.php | |
parent | 80768b526bd3f7167703dad8be1b297bbb9cc3f7 (diff) | |
parent | efc09df8dfc8fff873dcc0ff55ac3c95e8e9f8c9 (diff) | |
download | forums-65d44923b42d93f28b407f7e7cb9041cf154490c.tar forums-65d44923b42d93f28b407f7e7cb9041cf154490c.tar.gz forums-65d44923b42d93f28b407f7e7cb9041cf154490c.tar.bz2 forums-65d44923b42d93f28b407f7e7cb9041cf154490c.tar.xz forums-65d44923b42d93f28b407f7e7cb9041cf154490c.zip |
Merge branch '3.1.x'
* 3.1.x:
[ticket/12952] Check obvious errors before status in functional tests
Diffstat (limited to 'tests/test_framework/phpbb_functional_test_case.php')
-rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 0fec3c2dff..bef1208609 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -863,15 +863,15 @@ class phpbb_functional_test_case extends phpbb_test_case */ static public function assert_response_html($status_code = 200) { - if ($status_code !== false) - { - self::assert_response_status_code($status_code); - } - // Any output before the doc type means there was an error $content = self::$client->getResponse()->getContent(); self::assertNotContains('[phpBB Debug]', $content); self::assertStringStartsWith('<!DOCTYPE', trim($content), 'Output found before DOCTYPE specification.'); + + if ($status_code !== false) + { + self::assert_response_status_code($status_code); + } } /* @@ -884,15 +884,15 @@ class phpbb_functional_test_case extends phpbb_test_case */ static public function assert_response_xml($status_code = 200) { - if ($status_code !== false) - { - self::assert_response_status_code($status_code); - } - // Any output before the xml opening means there was an error $content = self::$client->getResponse()->getContent(); self::assertNotContains('[phpBB Debug]', $content); self::assertStringStartsWith('<?xml', trim($content), 'Output found before XML specification.'); + + if ($status_code !== false) + { + self::assert_response_status_code($status_code); + } } /** |