From e4f562bdbaea5c9c04abbad7306a0fe24908e199 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 1 Feb 2016 15:25:31 +0100 Subject: [ticket/14442] Use Goutte 2.0 instead of outdated 1.0 PHPBB3-14442 --- tests/test_framework/phpbb_functional_test_case.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tests/test_framework/phpbb_functional_test_case.php') diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index a3864d3041..9135eee956 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -16,6 +16,7 @@ require_once __DIR__ . '/mock/phpbb_mock_null_installer_task.php'; class phpbb_functional_test_case extends phpbb_test_case { + /** @var \Goutte\Client */ static protected $client; static protected $cookieJar; static protected $root_url; @@ -81,9 +82,6 @@ class phpbb_functional_test_case extends phpbb_test_case self::$cookieJar = new CookieJar; self::$client = new Goutte\Client(array(), null, self::$cookieJar); - // Reset the curl handle because it is 0 at this point and not a valid - // resource - self::$client->getClient()->getCurlMulti()->reset(true); // Clear the language array so that things // that were added in other tests are gone @@ -169,7 +167,7 @@ class phpbb_functional_test_case extends phpbb_test_case */ static public function get_content() { - return self::$client->getResponse()->getContent(); + return (string) self::$client->getResponse()->getContent(); } // bootstrap, called after board is set up @@ -843,7 +841,7 @@ class phpbb_functional_test_case extends phpbb_test_case static public function assert_response_html($status_code = 200) { // Any output before the doc type means there was an error - $content = self::$client->getResponse()->getContent(); + $content = (string) self::$client->getResponse()->getContent(); self::assertNotContains('[phpBB Debug]', $content); self::assertStringStartsWith('getResponse()->getContent(); + $content = (string) self::$client->getResponse()->getContent(); self::assertNotContains('[phpBB Debug]', $content); self::assertStringStartsWith('