diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..d821e29 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,25 @@ +language: php + +sudo: false + +git: + depth: 2 + +matrix: + include: + - php: 7.0 + - php: 7.1 + - php: nightly + fast_finish: true + +cache: + directories: + - $HOME/.composer/cache + +before_script: + - phpenv config-rm xdebug.ini || true + - travis_retry composer self-update + - travis_retry composer install --no-interaction + +script: + - composer test diff --git a/composer.json b/composer.json index be64ce3..c6ab300 100644 --- a/composer.json +++ b/composer.json @@ -14,11 +14,21 @@ "Codecasts\\Auth\\JWT\\": "src/" } }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, "minimum-stability": "stable", "require": { "php": ">=7.0.0", "ext-openssl": "*", "lcobucci/jwt": "^3.2", "illuminate/support": ">=5.4.0" + }, + "require-dev": { + "orchestra/testbench": "^3.4", + "phpunit/phpunit": "^6.1", + "mockery/mockery": "^0.9.9" } } diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..6ae9bf5 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,22 @@ + + + + + tests/ + + + + + src/ + + + diff --git a/tests/Auth/GuardTest.php b/tests/Auth/GuardTest.php new file mode 100644 index 0000000..759dacb --- /dev/null +++ b/tests/Auth/GuardTest.php @@ -0,0 +1,10 @@ +