File tree Expand file tree Collapse file tree 6 files changed +56
-3
lines changed
Expand file tree Collapse file tree 6 files changed +56
-3
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1-
1+ [ ![ Build Status ] ( https://travis-ci.org/phansys/php-jwt.png?branch=master )] ( https://travis-ci.org/phansys/php-jwt )
22PHP-JWT
33=======
44A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 11<?php
22
3- include_once 'Authentication/JWT.php ' ;
4-
53class JWTTest extends PHPUnit_Framework_TestCase {
64 function testEncodeDecode () {
75 $ msg = JWT ::encode ('abc ' , 'my_key ' );
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ // if the library is the project, try to use the composer's autoload for the tests
4+ $composerAutoload = __DIR__ . '/../vendor/autoload.php';
5+
6+ if (is_file($composerAutoload)) {
7+ include $composerAutoload;
8+ } else {
9+ die('Unable to find autoload.php file, please use composer to load dependencies:
10+
11+ wget http://getcomposer.org/composer.phar
12+ php composer.phar install
13+
14+ Visit http://getcomposer.org/ for more information.
15+
16+ ');
17+ }
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments