mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-22 19:07:27 +01:00
Merge branch '3.1.x'
* 3.1.x: [ticket/12952] Check obvious errors before status in functional tests
This commit is contained in:
commit
65d44923b4
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user