Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Commit

Permalink
Update the testsuite to use the new mink/driver-testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Oct 1, 2016
1 parent 614cfc8 commit afa2847
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
28 changes: 16 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ cache:
directories:
- $HOME/.composer/cache/files

php: [5.3, 5.4, 5.5, 5.6, 7.0, hhvm]
php: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, hhvm]

env:
global:
- NODE_VERSION=''
- ZOMBIE_VERSION='@^3.0' # npm will install Zombie 4.x by default, even though it is not compatible with the version of node available on Travis.
- WEB_FIXTURES_HOST=http://localhost:8000
# Force using PHP 5.6 for the webserver to be able to run it on PHP 5.3 and HHVM jobs too
- MINK_PHP_BIN=~/.phpenv/versions/5.6/bin/php
# Force binding to IPv4 as Zombie and PHP seem to have a different resolution for localhost on Travis.
- MINK_HOST=127.0.0.1:8002

matrix:
include:
Expand All @@ -23,21 +26,22 @@ matrix:
- NODE_VERSION='5.4.1'
- ZOMBIE_VERSION='@^4.0'

before_script:
# Install deps
- composer install

# Start a webserver for web fixtures. Force using PHP 5.6 to be able to run it on PHP 5.3 and HHVM jobs too
- ~/.phpenv/versions/5.6/bin/php -S 127.0.0.1:8000 -t vendor/behat/mink/driver-testsuite/web-fixtures > /dev/null 2>&1 &

before_install:
- if [[ "$NODE_VERSION" != "" ]]; then wget https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz && tar xf node-v${NODE_VERSION}-linux-x64.tar.xz && export PATH="`pwd`/node-v${NODE_VERSION}-linux-x64/bin:$PATH"; fi

- node --version && npm --version
- node --version
- npm --version

install:
- composer install
- npm install zombie$ZOMBIE_VERSION

before_script:
# Start a webserver for web fixtures.
- vendor/bin/mink-test-server > /dev/null 2>&1 &

script: phpunit -v --coverage-clover=coverage.clover

after_script:
# XDebug is not yet available on PHP 7 so we don't have code coverage there. Not uploading it avoids telling Scrutinizer that it is missing
- if [[ "$TRAVIS_PHP_VERSION" != "7" ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
# XDebug is not yet available on PHP 7.1 so we don't have code coverage there. Not uploading it avoids telling Scrutinizer that it is missing
- if [[ "$TRAVIS_PHP_VERSION" != "7.1" ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},

"require-dev": {
"symfony/phpunit-bridge": "~2.7|~3.0"
"mink/driver-testsuite": "dev-master"
},

"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit colors="true" bootstrap="vendor/behat/mink/driver-testsuite/bootstrap.php">
<phpunit colors="true" bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="Driver test suite">
<directory>tests</directory>
<directory>vendor/behat/mink/driver-testsuite/tests</directory>
<directory>vendor/mink/driver-testsuite/tests</directory>
</testsuite>
</testsuites>

Expand Down

0 comments on commit afa2847

Please sign in to comment.