diff options
| author | Joseph Warner <hardolaf@hardolaf.com> | 2013-09-06 20:35:18 -0400 |
|---|---|---|
| committer | Joseph Warner <hardolaf@hardolaf.com> | 2013-09-06 20:35:54 -0400 |
| commit | 3a6b3d7c2b38b244d5c725ce1c7829328dae770f (patch) | |
| tree | a05c248c1f3e99ad2ebbfb16f12427f059cd6e9e /tests/test_framework/phpbb_functional_test_case.php | |
| parent | d5808f13e5fa70ecc802c2a5a11c3143746c93f0 (diff) | |
| parent | 8d6b03c438392cebed941491684ff835bf7136a8 (diff) | |
| download | forums-3a6b3d7c2b38b244d5c725ce1c7829328dae770f.tar forums-3a6b3d7c2b38b244d5c725ce1c7829328dae770f.tar.gz forums-3a6b3d7c2b38b244d5c725ce1c7829328dae770f.tar.bz2 forums-3a6b3d7c2b38b244d5c725ce1c7829328dae770f.tar.xz forums-3a6b3d7c2b38b244d5c725ce1c7829328dae770f.zip | |
[feature/oauth] Merge branch 'develop' of git://github.com/phpbb/phpbb3 into feature/oauth
Conflicts:
phpBB/composer.json
phpBB/composer.lock
phpBB/develop/create_schema_files.php
phpBB/includes/ucp/ucp_register.php
PHPBB3-11673
Diffstat (limited to 'tests/test_framework/phpbb_functional_test_case.php')
| -rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index ed307c3ce2..ce748bb9cf 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -747,6 +747,27 @@ class phpbb_functional_test_case extends phpbb_test_case self::assertStringStartsWith('<!DOCTYPE', trim($content), 'Output found before DOCTYPE specification.'); } + /* + * Perform some basic assertions for an xml page + * + * Checks for debug/error output before the actual page content and the status code + * + * @param mixed $status_code Expected status code, false to disable check + * @return null + */ + 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.'); + } + /** * Heuristic function to check that the response is success. * @@ -936,7 +957,7 @@ class phpbb_functional_test_case extends phpbb_test_case ); } - /* + /** * Returns the requested parameter from a URL * * @param string $url |
