Skip to content

Commit 4908d37

Browse files
committed
chore(deps): Allow Laravel 6
1 parent 6e94571 commit 4908d37

File tree

3 files changed

+41
-17
lines changed

3 files changed

+41
-17
lines changed

.travis.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,28 @@ matrix:
2121
env: LARAVEL='5.4.*' XDEBUG=1
2222
group: edge
2323
- php: 5.5.9
24+
dist: trusty
2425
env: LARAVEL='5.1.*'
2526
- php: 5.5.9
27+
dist: trusty
2628
env: LARAVEL='5.2.*'
2729
- php: 5.5
30+
dist: trusty
2831
env: LARAVEL='5.1.*'
2932
- php: 5.5
33+
dist: trusty
3034
env: LARAVEL='5.2.*'
3135
- php: 5.6
36+
dist: trusty
3237
env: LARAVEL='5.1.*'
3338
- php: 5.6
39+
dist: trusty
3440
env: LARAVEL='5.2.*'
3541
- php: 5.6
42+
dist: trusty
3643
env: LARAVEL='5.3.*'
3744
- php: 5.6
45+
dist: trusty
3846
env: LARAVEL='5.4.*'
3947
- php: 7.0
4048
env: LARAVEL='5.1.*'
@@ -78,6 +86,8 @@ matrix:
7886
env: LARAVEL='5.7.*'
7987
- php: 7.2
8088
env: LARAVEL='5.8.*'
89+
- php: 7.2
90+
env: LARAVEL='6.*'
8191
- php: 7.3
8292
env: LARAVEL='5.1.*' XDEBUG=1
8393
- php: 7.3
@@ -93,7 +103,9 @@ matrix:
93103
- php: 7.3
94104
env: LARAVEL='5.7.*' XDEBUG=1
95105
- php: 7.3
96-
env: COVERAGE=1 LARAVEL='5.8.*' XDEBUG=1
106+
env: LARAVEL='5.8.*' XDEBUG=1
107+
- php: 7.3
108+
env: COVERAGE=1 LARAVEL='6.*' XDEBUG=1
97109
fast_finish: true
98110

99111

@@ -106,8 +118,14 @@ install:
106118
- travis_retry composer install --prefer-dist --no-interaction --no-suggest
107119

108120
script:
109-
- if [[ $LARAVEL = '5.1.*' ]]; then composer test:ci -- --exclude-group laravel-5.2; fi
110-
- if [[ $LARAVEL != '5.1.*' ]]; then composer test:ci; fi
121+
- |
122+
if [[ $LARAVEL == '6.*' ]]; then
123+
composer test:ci -- --exclude-group sentinel-2
124+
elif [[ $LARAVEL == '5.1.*' ]]; then
125+
composer test:ci -- --exclude-group laravel-5.2
126+
else
127+
composer test:ci
128+
fi
111129
112130
after_success:
113131
- if [[ $COVERAGE = 1 ]]; then bash <(curl -s https://codecov.io/bash); fi

composer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@
2323
}
2424
],
2525
"require": {
26-
"php": "^5.5.9 || ^7.0",
27-
"illuminate/auth": "^5.1",
28-
"illuminate/contracts": "^5.1",
29-
"illuminate/http": "^5.1",
30-
"illuminate/support": "^5.1",
26+
"php": "^5.5.9|^7.0",
27+
"illuminate/auth": "^5.1|^6",
28+
"illuminate/contracts": "^5.1|^6",
29+
"illuminate/http": "^5.1|^6",
30+
"illuminate/support": "^5.1|^6",
3131
"lcobucci/jwt": "^3.2",
3232
"namshi/jose": "^7.0",
33-
"nesbot/carbon": "^1.0 || ^2.0"
33+
"nesbot/carbon": "^1.0|^2.0"
3434
},
3535
"require-dev": {
36-
"cartalyst/sentinel": "2.0.*",
37-
"illuminate/console": "^5.1",
38-
"illuminate/database": "^5.1",
39-
"illuminate/routing": "^5.1",
36+
"cartalyst/sentinel": "^2|^3",
37+
"illuminate/console": "^5.1|^6",
38+
"illuminate/database": "^5.1|^6",
39+
"illuminate/routing": "^5.1|^6",
4040
"mockery/mockery": ">=0.9.9",
41-
"phpunit/phpunit": "~4.8 || ~6.0"
41+
"phpunit/phpunit": "~4.8|~6.0"
4242
},
4343
"autoload": {
4444
"psr-4": {

tests/Providers/Auth/SentinelTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ public function it_should_return_true_if_credentials_are_valid()
4444
$this->assertTrue($this->auth->byCredentials(['email' => '[email protected]', 'password' => 'foobar']));
4545
}
4646

47-
/** @test */
47+
/**
48+
* @test
49+
* @group sentinel-2
50+
*/
4851
public function it_should_return_true_if_user_is_found()
4952
{
5053
$stub = new SentinelStub;
@@ -57,13 +60,16 @@ public function it_should_return_true_if_user_is_found()
5760
/** @test */
5861
public function it_should_return_false_if_user_is_not_found()
5962
{
60-
$this->sentinel->shouldReceive('getUserRepository->findById')->once()->with(321)->andReturn(false);
63+
$this->sentinel->shouldReceive('getUserRepository->findById')->once()->with(321)->andReturn(null);
6164
$this->sentinel->shouldReceive('setUser')->never();
6265

6366
$this->assertFalse($this->auth->byId(321));
6467
}
6568

66-
/** @test */
69+
/**
70+
* @test
71+
* @group sentinel-2
72+
*/
6773
public function it_should_return_the_currently_authenticated_user()
6874
{
6975
$this->sentinel->shouldReceive('getUser')->once()->andReturn(new SentinelStub);

0 commit comments

Comments
 (0)