Skip to content

Commit

Permalink
Improve the testsuite and the CI setup
Browse files Browse the repository at this point in the history
- use autoload-dev to register the test autoloading in the composer
  classloader
- disallow testsuite failures on HHVM
- run the testsuite against stable dependencies by default
- add testing against lowest dependencies on Travis
- add testing against dev version of dependencies on Travis
  • Loading branch information
stof committed Sep 20, 2015
1 parent 620a9e4 commit c92bfae
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 25 deletions.
21 changes: 14 additions & 7 deletions .travis.yml
Expand Up @@ -4,7 +4,7 @@ sudo: false

cache:
directories:
- $HOME/.composer/cache
- $HOME/.composer/cache/files

php:
- 5.3
Expand All @@ -13,13 +13,20 @@ php:
- 5.6
- 7.0
- hhvm

matrix:
allow_failures:
- php: hhvm
include:
- php: 5.3
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable' SYMFONY_DEPRECATIONS_HELPER=weak
- php: 5.6
env: DEPENDENCIES=dev

before_install:
- composer self-update
- if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;

install:
- composer update $COMPOSER_FLAGS

before_script:
- composer install

script:
- phpunit
8 changes: 6 additions & 2 deletions composer.json
Expand Up @@ -36,10 +36,14 @@
"autoload": {
"psr-4": { "Knp\\Menu\\": "src/Knp/Menu" }
},
"autoload-dev": {
"psr-4": {
"Knp\\Menu\\Tests\\": "tests/Knp/Menu/Tests"
}
},
"extra": {
"branch-alias": {
"dev-master": "2.1-dev"
}
},
"minimum-stability": "dev"
}
}
2 changes: 1 addition & 1 deletion phpunit.xml.dist
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit colors="true" bootstrap="tests/bootstrap.php">
<phpunit colors="true" bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="KnpMenu Test Suite">
<directory suffix="Test.php">./tests/</directory>
Expand Down
15 changes: 0 additions & 15 deletions tests/bootstrap.php

This file was deleted.

0 comments on commit c92bfae

Please sign in to comment.