diff options
author | Fyorl <gaelreth@gmail.com> | 2012-07-16 17:45:43 +0100 |
---|---|---|
committer | Fyorl <gaelreth@gmail.com> | 2012-07-16 17:52:03 +0100 |
commit | d88411e10de898d8ad58b1adf9dcedf0f170b67f (patch) | |
tree | f0b867474becb764028d86286f57b862220a2dcd /tests/test_framework | |
parent | 797ee16eaf2e8dc562185cd940351bcfd311cf53 (diff) | |
download | forums-d88411e10de898d8ad58b1adf9dcedf0f170b67f.tar forums-d88411e10de898d8ad58b1adf9dcedf0f170b67f.tar.gz forums-d88411e10de898d8ad58b1adf9dcedf0f170b67f.tar.bz2 forums-d88411e10de898d8ad58b1adf9dcedf0f170b67f.tar.xz forums-d88411e10de898d8ad58b1adf9dcedf0f170b67f.zip |
[ticket/10981] Modified functional framework to account for goutte changes
PHPBB3-10981
Diffstat (limited to 'tests/test_framework')
-rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 2b6a6aaf29..e1a45a1bc4 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -46,7 +46,10 @@ class phpbb_functional_test_case extends phpbb_test_case } $this->cookieJar = new CookieJar; - $this->client = new Goutte\Client(array(), array(), null, $this->cookieJar); + $this->client = new Goutte\Client(array(), null, $this->cookieJar); + // Reset the curl handle because it is 0 at this point and not a valid + // resource + $this->client->getClient()->getCurlMulti()->reset(true); $this->root_url = self::$config['phpbb_functional_url']; // Clear the language array so that things // that were added in other tests are gone @@ -191,9 +194,9 @@ class phpbb_functional_test_case extends phpbb_test_case $cookies = $this->cookieJar->all(); // The session id is stored in a cookie that ends with _sid - we assume there is only one such cookie - foreach ($cookies as $key => $cookie); + foreach ($cookies as $cookie); { - if (substr($key, -4) == '_sid') + if (substr($cookie->getName(), -4) == '_sid') { $this->sid = $cookie->getValue(); } |