Merge branch 'develop-olympus' into develop

* develop-olympus:
  [ticket/11513] Update RUNNING_TESTS.txt to no longer refer to PEAR.
  [ticket/11513] Update all CLI calls to phpunit to use vendor/bin.
  [ticket/11513] Use PHPUnit from composer in .travis.yml.
  [ticket/11513] Update (all) composer dependencies.
  [ticket/11513] Add PHPUnit 3.7 and DbUnit 1.2 as a composer dev dependency.

Conflicts:
	.travis.yml
	phpBB/composer.lock
This commit is contained in:
Nils Adermann 2013-05-09 19:42:13 +02:00
commit 3327739290
6 changed files with 435 additions and 17 deletions

View file

@ -18,16 +18,13 @@ before_script:
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi" - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi" - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi"
- travis/install-php-extensions.sh - travis/install-php-extensions.sh
- pyrus set auto_discover 1
- pyrus install --force phpunit/DbUnit
- phpenv rehash
- cd phpBB - cd phpBB
- php ../composer.phar install --dev - php ../composer.phar install --dev
- cd .. - cd ..
- sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi" - sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi"
script: script:
- phpunit --configuration travis/phpunit-$DB-travis.xml - phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml
notifications: notifications:
email: email:

View file

@ -56,7 +56,8 @@
<target name="test" depends="clean,prepare,composer"> <target name="test" depends="clean,prepare,composer">
<exec dir="." <exec dir="."
command="phpunit --log-junit build/logs/phpunit.xml command="phpBB/vendor/bin/phpunit
--log-junit build/logs/phpunit.xml
--coverage-clover build/logs/clover.xml --coverage-clover build/logs/clover.xml
--coverage-html build/coverage" --coverage-html build/coverage"
passthru="true" /> passthru="true" />
@ -64,7 +65,8 @@
<target name="test-slow" depends="clean,prepare,composer"> <target name="test-slow" depends="clean,prepare,composer">
<exec dir="." <exec dir="."
command="phpunit --log-junit build/logs/phpunit.xml command="phpBB/vendor/bin/phpunit
--log-junit build/logs/phpunit.xml
--configuration phpunit.xml.all --configuration phpunit.xml.all
--group slow --group slow
--coverage-clover build/logs/clover-slow.xml --coverage-clover build/logs/clover-slow.xml

View file

@ -78,12 +78,12 @@ function work($pull_id, $remote)
add_remote($pull_user, 'phpbb3'); add_remote($pull_user, 'phpbb3');
run("git fetch $pull_user"); run("git fetch $pull_user");
run("git merge --no-ff $pull_user/$pull_branch"); run("git merge --no-ff $pull_user/$pull_branch");
run("phpunit"); run("phpBB/vendor/bin/phpunit");
run("git checkout develop"); run("git checkout develop");
run("git pull $remote develop"); run("git pull $remote develop");
run("git merge --no-ff develop-olympus"); run("git merge --no-ff develop-olympus");
run("phpunit"); run("phpBB/vendor/bin/phpunit");
break; break;
case 'develop': case 'develop':
@ -93,7 +93,7 @@ function work($pull_id, $remote)
add_remote($pull_user, 'phpbb3'); add_remote($pull_user, 'phpbb3');
run("git fetch $pull_user"); run("git fetch $pull_user");
run("git merge --no-ff $pull_user/$pull_branch"); run("git merge --no-ff $pull_user/$pull_branch");
run("phpunit"); run("phpBB/vendor/bin/phpunit");
break; break;
default: default:

View file

@ -9,6 +9,8 @@
"symfony/yaml": "2.1.*" "symfony/yaml": "2.1.*"
}, },
"require-dev": { "require-dev": {
"fabpot/goutte": "v0.1.0" "fabpot/goutte": "v0.1.0",
"phpunit/dbunit": "1.2.*",
"phpunit/phpunit": "3.7.*"
} }
} }

414
phpBB/composer.lock generated
View file

@ -3,7 +3,7 @@
"This file locks the dependencies of your project to a known state", "This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
], ],
"hash": "c1a76530df6b9daa16b8033d61b76503", "hash": "3792dc25490f24210ece3b40789c5b98",
"packages": [ "packages": [
{ {
"name": "symfony/config", "name": "symfony/config",
@ -492,6 +492,418 @@
], ],
"time": "2012-12-19 23:06:35" "time": "2012-12-19 23:06:35"
}, },
{
"name": "phpunit/dbunit",
"version": "1.2.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/dbunit.git",
"reference": "1.2.3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/dbunit/zipball/1.2.3",
"reference": "1.2.3",
"shasum": ""
},
"require": {
"ext-pdo": "*",
"ext-simplexml": "*",
"php": ">=5.3.3",
"phpunit/phpunit": ">=3.7.0@stable"
},
"bin": [
"dbunit.php"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2.x-dev"
}
},
"autoload": {
"classmap": [
"PHPUnit/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
"",
"../../symfony/yaml/"
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "DbUnit port for PHP/PHPUnit to support database interaction testing.",
"homepage": "https://github.com/sebastianbergmann/dbunit/",
"keywords": [
"database",
"testing",
"xunit"
],
"time": "2013-03-01 11:50:46"
},
{
"name": "phpunit/php-code-coverage",
"version": "1.2.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "1.2.9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1.2.9",
"reference": "1.2.9",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"phpunit/php-file-iterator": ">=1.3.0@stable",
"phpunit/php-text-template": ">=1.1.1@stable",
"phpunit/php-token-stream": ">=1.1.3@stable"
},
"suggest": {
"ext-dom": "*",
"ext-xdebug": ">=2.0.5"
},
"type": "library",
"autoload": {
"classmap": [
"PHP/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
"keywords": [
"coverage",
"testing",
"xunit"
],
"time": "2013-02-26 18:55:56"
},
{
"name": "phpunit/php-file-iterator",
"version": "1.3.3",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "1.3.3"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/php-file-iterator/zipball/1.3.3",
"reference": "1.3.3",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"autoload": {
"classmap": [
"File/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
"homepage": "http://www.phpunit.de/",
"keywords": [
"filesystem",
"iterator"
],
"time": "2012-10-11 04:44:38"
},
{
"name": "phpunit/php-text-template",
"version": "1.1.4",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/php-text-template.git",
"reference": "1.1.4"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/php-text-template/zipball/1.1.4",
"reference": "1.1.4",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"autoload": {
"classmap": [
"Text/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Simple template engine.",
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
"keywords": [
"template"
],
"time": "2012-10-31 11:15:28"
},
{
"name": "phpunit/php-timer",
"version": "1.0.4",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/php-timer.git",
"reference": "1.0.4"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/php-timer/zipball/1.0.4",
"reference": "1.0.4",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"autoload": {
"classmap": [
"PHP/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Utility class for timing",
"homepage": "http://www.phpunit.de/",
"keywords": [
"timer"
],
"time": "2012-10-11 04:45:58"
},
{
"name": "phpunit/php-token-stream",
"version": "1.1.5",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/php-token-stream.git",
"reference": "1.1.5"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/php-token-stream/zipball/1.1.5",
"reference": "1.1.5",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=5.3.3"
},
"type": "library",
"autoload": {
"classmap": [
"PHP/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Wrapper around PHP's tokenizer extension.",
"homepage": "http://www.phpunit.de/",
"keywords": [
"tokenizer"
],
"time": "2012-10-11 04:47:14"
},
{
"name": "phpunit/phpunit",
"version": "3.7.19",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "3.7.19"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.19",
"reference": "3.7.19",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-pcre": "*",
"ext-reflection": "*",
"ext-spl": "*",
"php": ">=5.3.3",
"phpunit/php-code-coverage": ">=1.2.1,<1.3.0",
"phpunit/php-file-iterator": ">=1.3.1",
"phpunit/php-text-template": ">=1.1.1",
"phpunit/php-timer": ">=1.0.2,<1.1.0",
"phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0",
"symfony/yaml": ">=2.0.0,<2.3.0"
},
"require-dev": {
"pear-pear/pear": "1.9.4"
},
"suggest": {
"ext-json": "*",
"ext-simplexml": "*",
"ext-tokenizer": "*",
"phpunit/php-invoker": ">=1.1.0,<1.2.0"
},
"bin": [
"composer/bin/phpunit"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.7.x-dev"
}
},
"autoload": {
"classmap": [
"PHPUnit/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
"",
"../../symfony/yaml/"
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "The PHP Unit Testing framework.",
"homepage": "http://www.phpunit.de/",
"keywords": [
"phpunit",
"testing",
"xunit"
],
"time": "2013-03-25 11:45:06"
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "1.2.3",
"source": {
"type": "git",
"url": "git://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "1.2.3"
},
"dist": {
"type": "zip",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects/archive/1.2.3.zip",
"reference": "1.2.3",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"phpunit/php-text-template": ">=1.1.1@stable"
},
"suggest": {
"ext-soap": "*"
},
"type": "library",
"autoload": {
"classmap": [
"PHPUnit/"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
""
],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sb@sebastian-bergmann.de",
"role": "lead"
}
],
"description": "Mock Object library for PHPUnit",
"homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
"keywords": [
"mock",
"xunit"
],
"time": "2013-01-13 10:24:48"
},
{ {
"name": "symfony/browser-kit", "name": "symfony/browser-kit",
"version": "v2.1.10", "version": "v2.1.10",

View file

@ -7,9 +7,14 @@ Prerequisites
PHPUnit PHPUnit
------- -------
phpBB unit tests use PHPUnit framework. Version 3.5 or better is required phpBB unit tests use the PHPUnit framework (see http://www.phpunit.de for more
to run the tests. PHPUnit prefers to be installed via PEAR; refer to information). Version 3.5 or higher is required to run the tests. PHPUnit can
http://www.phpunit.de/ for more information. be installed via Composer together with other development dependencies as
follows.
$ cd phpBB
$ php ../composer.phar install --dev
$ cd ..
PHP extensions PHP extensions
-------------- --------------
@ -113,7 +118,7 @@ Running
Once the prerequisites are installed, run the tests from the project root Once the prerequisites are installed, run the tests from the project root
directory (above phpBB): directory (above phpBB):
$ phpunit $ phpBB/vendor/bin/phpunit
Slow tests Slow tests
-------------- --------------
@ -123,7 +128,7 @@ Thus these tests are in the `slow` group, which is excluded by default. You can
enable slow tests by copying the phpunit.xml.all file to phpunit.xml. If you enable slow tests by copying the phpunit.xml.all file to phpunit.xml. If you
only want the slow tests, run: only want the slow tests, run:
$ phpunit --group slow $ phpBB/vendor/bin/phpunit --group slow
More Information More Information
================ ================