Skip to content

Commit 9090fb1

Browse files
committed
Add support for Laravel 6
1 parent 115277f commit 9090fb1

File tree

4 files changed

+43
-16
lines changed

4 files changed

+43
-16
lines changed

.travis.yml

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,44 @@
11
language: php
22

3-
php:
4-
- 7.1
5-
- 7.2
3+
matrix:
4+
include:
5+
- php: 7.1
6+
env: ILLUMINATE_VERSION=5.8.* TESTBENCH_VERSION=3.8.*
7+
- php: 7.1
8+
env: ILLUMINATE_VERSION=5.7.* TESTBENCH_VERSION=3.7.*
9+
- php: 7.1
10+
env: ILLUMINATE_VERSION=5.6.* TESTBENCH_VERSION=3.6.*
11+
- php: 7.2
12+
env: ILLUMINATE_VERSION=6.* TESTBENCH_VERSION=4.*
13+
- php: 7.2
14+
env: ILLUMINATE_VERSION=5.8.* TESTBENCH_VERSION=3.8.*
15+
- php: 7.2
16+
env: ILLUMINATE_VERSION=5.7.* TESTBENCH_VERSION=3.7.*
17+
- php: 7.2
18+
env: ILLUMINATE_VERSION=5.6.* TESTBENCH_VERSION=3.6.*
19+
- php: 7.3
20+
env: ILLUMINATE_VERSION=6.* TESTBENCH_VERSION=4.*
21+
- php: 7.3
22+
env: ILLUMINATE_VERSION=5.8.* TESTBENCH_VERSION=3.8.*
23+
- php: 7.3
24+
env: ILLUMINATE_VERSION=5.7.* TESTBENCH_VERSION=3.7.*
25+
- php: 7.3
26+
env: ILLUMINATE_VERSION=5.6.* TESTBENCH_VERSION=3.6.*
27+
28+
before_script:
29+
30+
before_install:
31+
- travis_retry composer self-update
32+
- composer require "orchestra/testbench:${TESTBENCH_VERSION}" --no-update --dev
33+
- composer require "illuminate/support:${ILLUMINATE_VERSION}" --no-update
34+
35+
install: composer update --prefer-source --no-interaction
636

737
sudo: false
838

939
cache:
10-
directories:
11-
- $HOME/.composer/cache
12-
13-
before_script:
14-
- travis_retry composer self-update
15-
- travis_retry composer update --no-interaction
40+
directories:
41+
- $HOME/.composer/cache
1642

1743
script:
18-
- vendor/bin/phpunit
44+
- vendor/bin/phpunit

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
"require": {
2424
"php": "^7.1",
2525
"codezero/browser-locale": "^3.0",
26-
"illuminate/support": "^5.6"
26+
"illuminate/support": ">=5.6"
2727
},
2828
"require-dev": {
2929
"mockery/mockery": "^1.0",
30-
"orchestra/testbench": "3.6.*",
31-
"phpunit/phpunit": "^7.0"
30+
"orchestra/testbench": ">=3.6",
31+
"phpunit/phpunit": "^7.0|^8.0"
3232
},
3333
"scripts": {
3434
"test": "phpunit"

tests/Feature/SetLocaleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class SetLocaleTest extends TestCase
2121
*
2222
* @return void
2323
*/
24-
protected function setUp()
24+
protected function setUp(): void
2525
{
2626
parent::setUp();
2727

tests/TestCase.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use CodeZero\Localizer\LocalizerServiceProvider;
66
use Illuminate\Support\Facades\Config;
7+
use Illuminate\Support\Str;
78
use Orchestra\Testbench\TestCase as BaseTestCase;
89

910
abstract class TestCase extends BaseTestCase
@@ -13,11 +14,11 @@ abstract class TestCase extends BaseTestCase
1314
*
1415
* @return void
1516
*/
16-
protected function setUp()
17+
protected function setUp(): void
1718
{
1819
parent::setUp();
1920

20-
Config::set('app.key', str_random(32));
21+
Config::set('app.key', Str::random(32));
2122
}
2223

2324
/**

0 commit comments

Comments
 (0)