summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhansys <phansys@gmail.com>2013-08-30 16:55:02 -0300
committerPhansys <phansys@gmail.com>2013-08-30 16:55:02 -0300
commita68d81bc76e08aaa4c33db3865050656647147a5 (patch)
treeaddf6eafae3ca636423fecdedb93a75a07b48e75
parentae54c3752af9d58d5b9ae0273cd98bf30f572515 (diff)
downloadphp-jwt-a68d81bc76e08aaa4c33db3865050656647147a5.zip
php-jwt-a68d81bc76e08aaa4c33db3865050656647147a5.tar.gz
php-jwt-a68d81bc76e08aaa4c33db3865050656647147a5.tar.bz2
Added config for phpunit and Travis CI.
-rw-r--r--.travis.yml12
-rw-r--r--phpunit.xml.dist19
-rw-r--r--tests/bootstrap.php7
3 files changed, 38 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..1ecd967
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,12 @@
+language: php
+
+php:
+ - 5.3
+ - 5.4
+ - 5.5
+
+before_script:
+ - wget -nc http://getcomposer.org/composer.phar
+ - php composer.phar install
+
+script: phpunit --configuration phpunit.xml.dist
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
new file mode 100644
index 0000000..9f85f5b
--- /dev/null
+++ b/phpunit.xml.dist
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<phpunit backupGlobals="false"
+ backupStaticAttributes="false"
+ colors="true"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ processIsolation="false"
+ stopOnFailure="false"
+ syntaxCheck="false"
+ bootstrap="tests/bootstrap.php"
+>
+ <testsuites>
+ <testsuite name="PHP JSON Web Token Test Suite">
+ <directory>./tests</directory>
+ </testsuite>
+ </testsuites>
+</phpunit>
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
new file mode 100644
index 0000000..326c216
--- /dev/null
+++ b/tests/bootstrap.php
@@ -0,0 +1,7 @@
+<?php
+
+if (file_exists($file = __DIR__ . '/autoload.php')) {
+ require_once $file;
+} elseif (file_exists($file = __DIR__ . '/autoload.php.dist')) {
+ require_once $file;
+}