diff --git a/.travis.yml b/.travis.yml index cda0ae107..3af172bab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,20 +21,28 @@ matrix: env: LARAVEL='5.4.*' XDEBUG=1 group: edge - php: 5.5.9 + dist: trusty env: LARAVEL='5.1.*' - php: 5.5.9 + dist: trusty env: LARAVEL='5.2.*' - php: 5.5 + dist: trusty env: LARAVEL='5.1.*' - php: 5.5 + dist: trusty env: LARAVEL='5.2.*' - php: 5.6 + dist: trusty env: LARAVEL='5.1.*' - php: 5.6 + dist: trusty env: LARAVEL='5.2.*' - php: 5.6 + dist: trusty env: LARAVEL='5.3.*' - php: 5.6 + dist: trusty env: LARAVEL='5.4.*' - php: 7.0 env: LARAVEL='5.1.*' @@ -78,6 +86,8 @@ matrix: env: LARAVEL='5.7.*' - php: 7.2 env: LARAVEL='5.8.*' + - php: 7.2 + env: LARAVEL='6.*' - php: 7.3 env: LARAVEL='5.1.*' XDEBUG=1 - php: 7.3 @@ -93,7 +103,9 @@ matrix: - php: 7.3 env: LARAVEL='5.7.*' XDEBUG=1 - php: 7.3 - env: COVERAGE=1 LARAVEL='5.8.*' XDEBUG=1 + env: LARAVEL='5.8.*' XDEBUG=1 + - php: 7.3 + env: COVERAGE=1 LARAVEL='6.*' XDEBUG=1 fast_finish: true @@ -106,8 +118,14 @@ install: - travis_retry composer install --prefer-dist --no-interaction --no-suggest script: - - if [[ $LARAVEL = '5.1.*' ]]; then composer test:ci -- --exclude-group laravel-5.2; fi - - if [[ $LARAVEL != '5.1.*' ]]; then composer test:ci; fi + - | + if [[ $LARAVEL == '6.*' ]]; then + composer test:ci -- --exclude-group sentinel-2 + elif [[ $LARAVEL == '5.1.*' ]]; then + composer test:ci -- --exclude-group laravel-5.2 + else + composer test:ci + fi after_success: - if [[ $COVERAGE = 1 ]]; then bash <(curl -s https://codecov.io/bash); fi diff --git a/composer.json b/composer.json index 9730eb5fd..5b92a002a 100644 --- a/composer.json +++ b/composer.json @@ -23,22 +23,22 @@ } ], "require": { - "php": "^5.5.9 || ^7.0", - "illuminate/auth": "^5.1", - "illuminate/contracts": "^5.1", - "illuminate/http": "^5.1", - "illuminate/support": "^5.1", + "php": "^5.5.9|^7.0", + "illuminate/auth": "^5.1|^6", + "illuminate/contracts": "^5.1|^6", + "illuminate/http": "^5.1|^6", + "illuminate/support": "^5.1|^6", "lcobucci/jwt": "^3.2", "namshi/jose": "^7.0", - "nesbot/carbon": "^1.0 || ^2.0" + "nesbot/carbon": "^1.0|^2.0" }, "require-dev": { - "cartalyst/sentinel": "2.0.*", - "illuminate/console": "^5.1", - "illuminate/database": "^5.1", - "illuminate/routing": "^5.1", + "cartalyst/sentinel": "^2|^3", + "illuminate/console": "^5.1|^6", + "illuminate/database": "^5.1|^6", + "illuminate/routing": "^5.1|^6", "mockery/mockery": ">=0.9.9", - "phpunit/phpunit": "~4.8 || ~6.0" + "phpunit/phpunit": "~4.8|~6.0" }, "autoload": { "psr-4": { diff --git a/tests/Providers/Auth/SentinelTest.php b/tests/Providers/Auth/SentinelTest.php index 9b2702a39..e90cd1e37 100644 --- a/tests/Providers/Auth/SentinelTest.php +++ b/tests/Providers/Auth/SentinelTest.php @@ -44,7 +44,10 @@ public function it_should_return_true_if_credentials_are_valid() $this->assertTrue($this->auth->byCredentials(['email' => 'foo@bar.com', 'password' => 'foobar'])); } - /** @test */ + /** + * @test + * @group sentinel-2 + */ public function it_should_return_true_if_user_is_found() { $stub = new SentinelStub; @@ -57,13 +60,16 @@ public function it_should_return_true_if_user_is_found() /** @test */ public function it_should_return_false_if_user_is_not_found() { - $this->sentinel->shouldReceive('getUserRepository->findById')->once()->with(321)->andReturn(false); + $this->sentinel->shouldReceive('getUserRepository->findById')->once()->with(321)->andReturn(null); $this->sentinel->shouldReceive('setUser')->never(); $this->assertFalse($this->auth->byId(321)); } - /** @test */ + /** + * @test + * @group sentinel-2 + */ public function it_should_return_the_currently_authenticated_user() { $this->sentinel->shouldReceive('getUser')->once()->andReturn(new SentinelStub);