Skip to content

Commit

Permalink
Merge pull request #247 from jackalope/test_lowest
Browse files Browse the repository at this point in the history
Test lowest versions
  • Loading branch information
lsmith77 committed Feb 25, 2015
2 parents 744bbf4 + b8bcd66 commit 2f2ddf1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 13 deletions.
29 changes: 19 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,33 @@ php:
- hhvm

env:
- DB=mysql
- DB=pgsql
- DB=sqlite
- DB=mysql PACKAGE_VERSION=high
- DB=pgsql PACKAGE_VERSION=high
- DB=sqlite PACKAGE_VERSION=high


matrix:
allow_failures:
- php: hhvm
# hhvm will fail until libxml support is added https://github.com/facebook/hhvm/issues/1194
include:
- php: 5.3.3
env: DB=mysql PACKAGE_VERSION=low
- php: 5.3.3
env: DB=pgsql PACKAGE_VERSION=low
- php: 5.3.3
env: DB=sqlite PACKAGE_VERSION=low

before_script:
- composer selfupdate
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
- composer self-update
- composer update --prefer-source --no-interaction
- if [[ "$PACKAGE_VERSION" == "high" ]]; then composer update --prefer-source --no-interaction; fi
- if [[ "$PACKAGE_VERSION" == "low" ]]; then composer update --prefer-lowest --prefer-source --no-interaction; fi
- if [[ "$DB" == "mysql" ]]; then mysql -e "create database phpcr_tests;"; fi
- if [[ "$DB" == "pgsql" ]]; then psql -c "create database phpcr_tests;" -U postgres; fi
- php tests/generate_phpunit_config.php $DB

script: php vendor/bin/phpunit -c $DB.phpunit.xml

matrix:
allow_failures:
- php: hhvm
# hhvm will fail until libxml support is added https://github.com/facebook/hhvm/issues/1194

notifications:
irc: "irc.freenode.org#jackalope"
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"require": {
"php": ">=5.3.3",
"doctrine/dbal": "~2.4",
"doctrine/dbal": "~2.5,>=2.5.0",
"phpcr/phpcr": "~2.1.2",
"phpcr/phpcr-utils": "~1.2,>=1.2.4",
"jackalope/jackalope": "~1.2.0"
Expand All @@ -27,7 +27,8 @@
},
"require-dev": {
"psr/log": "~1.0",
"phpcr/phpcr-api-tests": "~2.1.0",
"phpcr/phpcr-api-tests": "2.1.3",
"phpunit/phpunit": "4.7.*",
"phpunit/dbunit": "~1.3"
},
"autoload": {
Expand Down
9 changes: 8 additions & 1 deletion tests/generate_fixtures.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
function generate_fixtures($srcDir, $destDir)
{
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($srcDir)) as $srcFile) {
if (!$srcFile->isFile() || $srcFile->getExtension() !== 'xml') {
if (method_exists($srcFile, 'getExtension')) {
$extension = $srcFile->getExtension();
} else {
// fallback for PHP <5.3.6
$extension = pathinfo($srcFile, PATHINFO_EXTENSION);
}

if (!$srcFile->isFile() || $extension !== 'xml') {
continue;
}

Expand Down

0 comments on commit 2f2ddf1

Please sign in to comment.