Skip to content

Commit ae83e89

Browse files
committed
Added autoload.php.dist for test suite.
1 parent a68d81b commit ae83e89

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

tests/JWTTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
include_once 'Authentication/JWT.php';
4-
53
class JWTTest extends PHPUnit_Framework_TestCase {
64
function testEncodeDecode() {
75
$msg = JWT::encode('abc', 'my_key');

tests/autoload.php.dist

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
}

0 commit comments

Comments
 (0)