diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2012-07-19 16:59:45 +0200 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2012-07-19 16:59:45 +0200 |
| commit | db7b879b8221fc1d1989e00645cb08f2866d9c10 (patch) | |
| tree | 01f09b1b7e37bd3bf79ce663a13d6c515c2ada3c /tests/test_framework/phpbb_functional_test_case.php | |
| parent | 8b230f59db87190f9209ff965c01eb72466f45d2 (diff) | |
| parent | 3bbb882fe8b9c894e9ad6cf9b4c42b590b8b3fe2 (diff) | |
| download | forums-db7b879b8221fc1d1989e00645cb08f2866d9c10.tar forums-db7b879b8221fc1d1989e00645cb08f2866d9c10.tar.gz forums-db7b879b8221fc1d1989e00645cb08f2866d9c10.tar.bz2 forums-db7b879b8221fc1d1989e00645cb08f2866d9c10.tar.xz forums-db7b879b8221fc1d1989e00645cb08f2866d9c10.zip | |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/10981] Added check for PHP version before running composer
[ticket/10981] Modified travis to use composer with --dev
[ticket/10981] Removed setupBeforeClass
[ticket/10981] Modified functional framework to account for goutte changes
[ticket/10981] Added goutte via composer
Conflicts:
.travis.yml
composer.phar
phpBB/composer.json
phpBB/composer.lock
tests/bootstrap.php
Diffstat (limited to 'tests/test_framework/phpbb_functional_test_case.php')
| -rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 76650feb02..c042d75811 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -34,16 +34,6 @@ class phpbb_functional_test_case extends phpbb_test_case static protected $config = array(); static protected $already_installed = false; - static public function setUpBeforeClass() - { - if (!extension_loaded('phar')) - { - self::markTestSkipped('phar extension is not loaded'); - } - - require_once 'phar://' . __DIR__ . '/../../vendor/goutte.phar'; - } - public function setUp() { if (!isset(self::$config['phpbb_functional_url'])) @@ -52,7 +42,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 @@ -251,9 +244,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(); } |
