-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #255 from KnpLabs/update-phpunit
Updating to use phpunit-bridge and updating travis config
- Loading branch information
Showing
3 changed files
with
55 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,38 @@ | ||
language: php | ||
|
||
sudo: false | ||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
directories: | ||
- $HOME/.composer/cache/files | ||
- $HOME/symfony-bridge/.phpunit | ||
|
||
php: | ||
- 7.1 | ||
- 7.2 | ||
- 7.3 | ||
env: | ||
global: | ||
- PHPUNIT_FLAGS="-v" | ||
- SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit" | ||
- SYMFONY_REQUIRE='>=2.8' | ||
|
||
matrix: | ||
include: | ||
- php: 7.3 | ||
env: SYMFONY_VERSION="5.0.*@dev" | ||
- php: 7.1 | ||
env: SYMFONY_VERSION="4.3.*@dev" | ||
- php: 7.3 | ||
env: SYMFONY_VERSION="3.4.*@dev" | ||
- php: 7.2 | ||
env: DEPENDENCIES=beta | ||
fast_finish: true | ||
fast_finish: true | ||
include: | ||
- php: 7.1 | ||
- php: 7.2 | ||
- php: 7.3 | ||
env: deps=low | ||
|
||
before_install: | ||
- if [ "$DEPENDENCIES" = "beta" ]; then composer config minimum-stability beta; fi; | ||
- if [ "$DEPENDENCIES" = "dev" ]; then composer config minimum-stability dev; fi; | ||
- if [[ "$SYMFONY_VERSION" != "" ]]; then composer require --no-update symfony/symfony:${SYMFONY_VERSION}; fi | ||
- phpenv config-rm xdebug.ini || true | ||
- composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-master | ||
|
||
install: composer update --prefer-dist | ||
install: | ||
- | | ||
if [[ $deps = low ]]; then | ||
export SYMFONY_DEPRECATIONS_HELPER=weak | ||
composer update --prefer-dist --prefer-lowest --prefer-stable | ||
else | ||
composer update --prefer-dist | ||
fi | ||
- ./vendor/bin/simple-phpunit install | ||
|
||
script: | ||
- vendor/bin/phpunit | ||
- composer validate --strict --no-check-lock | ||
- ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html --> | ||
|
||
<phpunit | ||
backupGlobals = "false" | ||
backupStaticAttributes = "false" | ||
colors = "true" | ||
convertErrorsToExceptions = "true" | ||
convertNoticesToExceptions = "true" | ||
convertWarningsToExceptions = "true" | ||
processIsolation = "false" | ||
stopOnFailure = "false" | ||
bootstrap = "vendor/autoload.php" > | ||
<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html --> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.3/phpunit.xsd" | ||
backupGlobals="false" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
failOnRisky="true" | ||
failOnWarning="true" | ||
> | ||
<php> | ||
<server name="SYMFONY_PHPUNIT_VERSION" value="7.5" /> | ||
</php> | ||
|
||
<testsuites> | ||
<testsuite name="KnpSnappyBundle Test Suite"> | ||
<directory>./Tests</directory> | ||
<testsuite name="Project Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> | ||
|
||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory>.</directory> | ||
<exclude> | ||
<directory>tests</directory> | ||
<directory>vendor</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |