Skip to content

Commit

Permalink
chore(deps): Allow Laravel 6
Browse files Browse the repository at this point in the history
  • Loading branch information
tymondesigns committed Sep 9, 2019
1 parent 6e94571 commit 4908d37
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 17 deletions.
24 changes: 21 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.*'
Expand Down Expand Up @@ -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
Expand All @@ -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


Expand All @@ -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
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
12 changes: 9 additions & 3 deletions tests/Providers/Auth/SentinelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 4908d37

Please sign in to comment.