File tree 3 files changed +25
-10
lines changed
tests/PackageServiceProviderTests/InstallCommandTests
3 files changed +25
-10
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,22 @@ jobs:
10
10
matrix :
11
11
os : [ubuntu-latest, windows-latest]
12
12
php : [8.0, 8.1, 8.2]
13
- laravel : [10.*, 9.*]
13
+ laravel : [11.*, 10.*, 9.*]
14
14
stability : [prefer-lowest, prefer-stable]
15
15
include :
16
16
- laravel : 9.*
17
17
testbench : 7.*
18
18
- laravel : 10.*
19
19
testbench : 8.*
20
+ - laravel : 11.*
21
+ testbench : 9.*
20
22
exclude :
21
23
- laravel : 10.*
22
24
php : 8.0
25
+ - laravel : 11.*
26
+ php : 8.0
27
+ - laravel : 11.*
28
+ php : 8.1
23
29
24
30
name : P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
25
31
41
47
42
48
- name : Install dependencies
43
49
run : |
44
- composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:^2.64.1 " --no-interaction --no-update
50
+ composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:^2.72.2 " --no-interaction --no-update
45
51
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
46
52
47
53
- name : Execute tests
Original file line number Diff line number Diff line change 20
20
},
21
21
"require-dev" : {
22
22
"mockery/mockery" : " ^1.5" ,
23
- "orchestra/testbench" : " ^7.7|^8.0" ,
24
- "pestphp/pest" : " ^1.22" ,
25
- "phpunit/phpunit" : " ^9.5.24" ,
26
- "spatie/pest-plugin-test-time" : " ^1.1"
23
+ "orchestra/testbench" : " ^7.7|^8.0|^9.0 " ,
24
+ "pestphp/pest" : " ^1.22|^2 " ,
25
+ "phpunit/phpunit" : " ^9.5.24|^10.5 " ,
26
+ "spatie/pest-plugin-test-time" : " ^1.1|^2.2 "
27
27
},
28
28
"autoload" : {
29
29
"psr-4" : {
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
use function PHPUnit \Framework \assertStringContainsString ;
4
+ use function PHPUnit \Framework \assertStringNotContainsString ;
4
5
use Spatie \LaravelPackageTools \Commands \InstallCommand ;
5
6
use Spatie \LaravelPackageTools \Package ;
6
7
@@ -40,10 +41,18 @@ function restoreAppConfigFile(): void
40
41
->artisan ('package-tools:install ' )
41
42
->assertSuccessful ();
42
43
43
- assertStringContainsString (
44
- "App\Providers\MyPackageServiceProvider::class " ,
45
- file_get_contents (base_path ('config/app.php ' ))
46
- );
44
+ if (intval (app ()->version ()) >= 11 ) {
45
+ // This does not happen in L11 because of the different framework skeleton
46
+ assertStringNotContainsString (
47
+ "App\Providers\MyPackageServiceProvider::class " ,
48
+ file_get_contents (base_path ('config/app.php ' ))
49
+ );
50
+ } else {
51
+ assertStringContainsString (
52
+ "App\Providers\MyPackageServiceProvider::class " ,
53
+ file_get_contents (base_path ('config/app.php ' ))
54
+ );
55
+ }
47
56
48
57
restoreAppConfigFile ();
49
58
});
You can’t perform that action at this time.
0 commit comments