diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-02-02 13:01:25 +0100 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-02-02 13:01:25 +0100 |
commit | 15e9367b5b9add3197ea13658499d60de14baa54 (patch) | |
tree | bf5caa21fb43e224e6f1a41a48d6c0ca626f1629 /tests/test_framework/phpbb_functional_test_case.php | |
parent | b2b99e5da8036734e63d27577cf007752b20da7a (diff) | |
parent | fdb16225889974a47d539079d0f42950b5dfc3f1 (diff) | |
download | forums-15e9367b5b9add3197ea13658499d60de14baa54.tar forums-15e9367b5b9add3197ea13658499d60de14baa54.tar.gz forums-15e9367b5b9add3197ea13658499d60de14baa54.tar.bz2 forums-15e9367b5b9add3197ea13658499d60de14baa54.tar.xz forums-15e9367b5b9add3197ea13658499d60de14baa54.zip |
Merge pull request #4152 from marc1706/ticket/14442
[ticket/14442] Use Goutte 2.0 for functional tests
* marc1706/ticket/14442:
[ticket/14442] Use get_content() in functional test case
[ticket/14442] Properly set plupload header
[ticket/14442] Use get_content() in plupload functional tests
[ticket/14442] Use Goutte 2.0 instead of outdated 1.0
Diffstat (limited to 'tests/test_framework/phpbb_functional_test_case.php')
-rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index a3864d3041..34fbcec0e2 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 = self::get_content(); self::assertNotContains('[phpBB Debug]', $content); self::assertStringStartsWith('<!DOCTYPE', trim($content), 'Output found before DOCTYPE specification.'); @@ -864,7 +862,7 @@ class phpbb_functional_test_case extends phpbb_test_case static public function assert_response_xml($status_code = 200) { // Any output before the xml opening means there was an error - $content = self::$client->getResponse()->getContent(); + $content = self::get_content(); self::assertNotContains('[phpBB Debug]', $content); self::assertStringStartsWith('<?xml', trim($content), 'Output found before XML specification.'); |