Skip to content

Commit

Permalink
Merge pull request #20 from Ocramius/feature/hhvm-build
Browse files Browse the repository at this point in the history
HHVM in build matrix
  • Loading branch information
polyfractal committed Jan 7, 2014
2 parents 43fcde8 + 663c24f commit ca26e44
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#phpunit related
phpunit.xml

#composer related
composer.lock
vendor/
Expand Down
18 changes: 12 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
language: php
php:
- "5.5"
- "5.4"
- "5.3"
- 5.5
- 5.4
- 5.3
- hhvm

before_script:
- composer install --dev
- composer install --dev --prefer-source
- mkdir -p build/logs

script: phpunit --bootstrap tests/bootstrap.php --no-configuration --coverage-clover build/logs/clover.xml tests
script:
- ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml

after_script:
- php vendor/bin/coveralls -v
- php vendor/bin/coveralls -v

matrix:
allow_failures:
- php: hhvm
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
"name": "Zachary Tong"
}
],
"minimum-stability": "dev",
"require": {
"php": ">=5.3.0",
"zeptech/annotations": "1.1.0",
"php": ">=5.3.9",
"zeptech/annotations": "1.1.*",
"nategood/commando": "0.2.1",
"pimple/pimple": "v1.0.2"
"pimple/pimple": "1.*"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
"mikey179/vfsStream": "1.3.*@dev",
"mockery/mockery": "dev-master@dev",
"satooshi/php-coveralls": "dev-master"
"phpunit/phpunit": "~3.8",
"mikey179/vfsStream": "1.2.*",
"mockery/mockery": "0.8.*",
"satooshi/php-coveralls": "0.6.*"
},
"autoload": {
"psr-0": {
"Athletic": "src/",
"Athletic/Tests": "tests/"
"Athletic": "src/"
}
},
"bin" : [ "bin/athletic" ]
Expand Down
22 changes: 22 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<phpunit
bootstrap="./tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
verbose="true"
stopOnFailure="false"
processIsolation="false"
backupGlobals="false"
syntaxCheck="true"
>
<testsuite name="Athletic tests">
<directory>./tests/Athletic</directory>
</testsuite>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
</phpunit>
24 changes: 16 additions & 8 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@
* Time: 4:48 PM
*/

error_reporting(E_ALL | E_STRICT);
ini_set('error_reporting', E_ALL | E_STRICT);

// Ensure that composer has installed all dependencies
if (!file_exists(dirname(__DIR__) . '/composer.lock')) {
die("Dependencies must be installed using composer:\n\nphp composer.phar install --dev\n\n"
. "See http://getcomposer.org for help with installing composer\n");
$files = array(__DIR__ . '/../vendor/autoload.php', __DIR__ . '/../../../autoload.php');

foreach ($files as $file) {
if (file_exists($file)) {
$loader = require $file;

break;
}
}

if (! isset($loader)) {
throw new RuntimeException('vendor/autoload.php could not be found. Did you run `php composer.phar install`?');
}

/* @var $autoloader \Composer\Autoload\ClassLoader */
$autoloader = require_once(dirname(__DIR__) . '/vendor/autoload.php');
/* @var $loader \Composer\Autoload\ClassLoader */
$loader->add('Athletic\\', __DIR__);

$autoloader->add('Athletic', __DIR__);
unset($files, $file, $loader);

0 comments on commit ca26e44

Please sign in to comment.