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
This commit is contained in:
Andreas Fischer 2012-07-19 16:59:45 +02:00
commit db7b879b82
6 changed files with 61 additions and 21 deletions

View file

@ -15,8 +15,7 @@ before_script:
- pyrus install --force phpunit/DbUnit - pyrus install --force phpunit/DbUnit
- phpenv rehash - phpenv rehash
- cd phpBB - cd phpBB
- curl -s http://getcomposer.org/installer | php - php ../composer.phar install --dev
- php composer.phar install
- cd ../ - cd ../
script: script:

Binary file not shown.

View file

@ -1,5 +1,9 @@
{ {
"minimum-stability": "beta",
"require": { "require": {
"symfony/event-dispatcher": "2.0.*" "symfony/event-dispatcher": "2.1.*"
},
"require-dev": {
"fabpot/goutte": "1.0.x-dev"
} }
} }

50
phpBB/composer.lock generated
View file

@ -1,10 +1,54 @@
{ {
"hash": "9bada3748ec2933fe0864dcfafbcd671", "hash": "b2daff7465c71d924e915e72454ac266",
"packages": [ "packages": [
{ {
"package": "symfony/event-dispatcher", "package": "symfony/event-dispatcher",
"version": "v2.0.10" "version": "v2.1.0-BETA3"
} }
], ],
"aliases": [] "packages-dev": [
{
"package": "fabpot/goutte",
"version": "dev-master",
"alias-pretty-version": "1.0.x-dev",
"alias-version": "1.0.9999999.9999999-dev"
},
{
"package": "fabpot/goutte",
"version": "dev-master",
"source-reference": "c2ea8d9a6682d14482e57ede2371001b8a5238d2",
"commit-date": "1340264258"
},
{
"package": "guzzle/guzzle",
"version": "v2.6.6"
},
{
"package": "symfony/browser-kit",
"version": "v2.1.0-BETA3"
},
{
"package": "symfony/css-selector",
"version": "v2.1.0-BETA3"
},
{
"package": "symfony/dom-crawler",
"version": "v2.1.0-BETA3"
},
{
"package": "symfony/finder",
"version": "v2.1.0-BETA3"
},
{
"package": "symfony/process",
"version": "v2.1.0-BETA3"
}
],
"aliases": [
],
"minimum-stability": "beta",
"stability-flags": {
"fabpot/goutte": 20
}
} }

View file

@ -34,16 +34,6 @@ class phpbb_functional_test_case extends phpbb_test_case
static protected $config = array(); static protected $config = array();
static protected $already_installed = false; 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() public function setUp()
{ {
if (!isset(self::$config['phpbb_functional_url'])) 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->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']; $this->root_url = self::$config['phpbb_functional_url'];
// Clear the language array so that things // Clear the language array so that things
// that were added in other tests are gone // 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(); $cookies = $this->cookieJar->all();
// The session id is stored in a cookie that ends with _sid - we assume there is only one such cookie // 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(); $this->sid = $cookie->getValue();
} }

BIN
vendor/goutte.phar vendored

Binary file not shown.