aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2015-06-16 14:24:34 +0200
committerAndreas Fischer <bantu@phpbb.com>2015-06-16 14:24:34 +0200
commitefc09df8dfc8fff873dcc0ff55ac3c95e8e9f8c9 (patch)
tree53035ccbf334b718e3f64941bfd5a406356c4b90
parentdc9245dd7a5a13f67667df835957740b553d2313 (diff)
parent2503723e2fff11c2a14bf62f6e261cebd9ffcf06 (diff)
downloadforums-efc09df8dfc8fff873dcc0ff55ac3c95e8e9f8c9.tar
forums-efc09df8dfc8fff873dcc0ff55ac3c95e8e9f8c9.tar.gz
forums-efc09df8dfc8fff873dcc0ff55ac3c95e8e9f8c9.tar.bz2
forums-efc09df8dfc8fff873dcc0ff55ac3c95e8e9f8c9.tar.xz
forums-efc09df8dfc8fff873dcc0ff55ac3c95e8e9f8c9.zip
Merge pull request #3710 from marc1706/ticket/12952
[ticket/12952] Check obvious errors before status in functional tests * marc1706/ticket/12952: [ticket/12952] Check obvious errors before status in functional tests
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php20
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 844caa8f54..d403831626 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -854,15 +854,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);
+ }
}
/*
@@ -875,15 +875,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);
+ }
}
/**