Skip to content

Commit a68d81b

Browse files
committed
Added config for phpunit and Travis CI.
1 parent ae54c37 commit a68d81b

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

.travis.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: php
2+
3+
php:
4+
- 5.3
5+
- 5.4
6+
- 5.5
7+
8+
before_script:
9+
- wget -nc http://getcomposer.org/composer.phar
10+
- php composer.phar install
11+
12+
script: phpunit --configuration phpunit.xml.dist

phpunit.xml.dist

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
syntaxCheck="false"
12+
bootstrap="tests/bootstrap.php"
13+
>
14+
<testsuites>
15+
<testsuite name="PHP JSON Web Token Test Suite">
16+
<directory>./tests</directory>
17+
</testsuite>
18+
</testsuites>
19+
</phpunit>

tests/bootstrap.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
if (file_exists($file = __DIR__ . '/autoload.php')) {
4+
require_once $file;
5+
} elseif (file_exists($file = __DIR__ . '/autoload.php.dist')) {
6+
require_once $file;
7+
}

0 commit comments

Comments
 (0)