Skip to content

Commit ae4c2dc

Browse files
committed
Merge pull request #41 from h4cc/master
Travis builds and PHPUnit
2 parents e72c8bf + d7508ae commit ae4c2dc

File tree

3 files changed

+33
-6
lines changed

3 files changed

+33
-6
lines changed

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,25 @@ php:
55
- "5.4"
66
- "5.3"
77

8+
env:
9+
- SYMFONY_VERSION=2.2.*
10+
- SYMFONY_VERSION=2.3.*
11+
- SYMFONY_VERSION=2.4.*
12+
- SYMFONY_VERSION=2.5.*
13+
- SYMFONY_VERSION=2.6.*
14+
15+
matrix:
16+
fast_finish: true
17+
818
services:
919
- redis-server
1020
- memcached
1121

1222
before_script:
1323
- ./.travis.cache.sh
1424
- composer self-update
25+
- composer require symfony/symfony:${SYMFONY_VERSION} --no-update
1526
- composer install --dev --prefer-source --no-interaction
27+
28+
script:
29+
- php vendor/bin/phpunit

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@
1616
"email": "[email protected]"
1717
},
1818
"require": {
19-
"php": ">=5.3.0",
20-
"symfony/symfony": ">=2.1.0",
21-
"doctrine/cache": ">=1.3.0"
19+
"php": "~5.3",
20+
"symfony/symfony": "~2.2",
21+
"doctrine/cache": "~1.3"
22+
},
23+
"require-dev": {
24+
"phpunit/phpunit": "~4.4"
2225
},
2326
"suggest": {
2427
"ext-memcached": "Allows for caching with Memcached",

tests/bootstrap.php

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,19 @@
66
* @license http://www.apache.org/licenses/LICENSE-2.0.html Apache License, Version 2.0
77
*/
88

9-
if (!@include __DIR__ . '/../../../../../vendor/autoload.php') {
10-
die("You must set up the project dependencies, run the following commands:
9+
$autoloadFile = false;
10+
foreach(array(__DIR__ . '/../../../../../vendor/autoload.php', __DIR__ . '/../vendor/autoload.php') as $file) {
11+
if(is_file($file)) {
12+
$autoloadFile = $file;
13+
}
14+
}
15+
16+
if (!$autoloadFile) {
17+
echo "You must set up the project dependencies, run the following commands:
1118
wget http://getcomposer.org/composer.phar
1219
php composer.phar install --dev
13-
");
20+
";
21+
exit(1);
1422
}
23+
24+
require $autoloadFile;

0 commit comments

Comments
 (0)