File tree Expand file tree Collapse file tree 5 files changed +33
-36
lines changed Expand file tree Collapse file tree 5 files changed +33
-36
lines changed Original file line number Diff line number Diff line change 99 fail-fast : true
1010 matrix :
1111 os : [ubuntu-latest]
12- php : [8.2,8.3]
13- laravel : [10.* ]
12+ php : [8.2, 8.3]
13+ laravel : ["^11.0", "^ 10.0" ]
1414 dependency-version : [prefer-stable]
1515 include :
16- - laravel : 10.*
17- testbench : 8.*
16+ - laravel : " ^11.0"
17+ testbench : 9.*
18+ - laravel : " ^10.0"
19+ testbench : 8.*
1820
19- name : P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
21+ name : P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
2022
2123 steps :
2224 - name : Checkout code
Original file line number Diff line number Diff line change 44 "keywords" : [
55 " laravel" ,
66 " laravel eloquent" ,
7+ " laravel delete" ,
8+ " laravel destroy model" ,
79 " eloquent" ,
810 " soft deletes"
911 ],
1921 ],
2022 "require" : {
2123 "php" : " ^8.2" ,
22- "illuminate/config" : " ^10.0" ,
23- "illuminate/container" : " ^10.0" ,
24- "illuminate/contracts" : " ^10.0" ,
25- "illuminate/database" : " ^10.0"
24+ "illuminate/config" : " ^10.0|^11.0 " ,
25+ "illuminate/container" : " ^10.0|^11.0 " ,
26+ "illuminate/contracts" : " ^10.0|^11.0 " ,
27+ "illuminate/database" : " ^10.0|^11.0 "
2628 },
2729 "require-dev" : {
28- "orchestra/testbench" : " ^8.8 " ,
29- "phpunit/phpunit" : " ^10.0 "
30+ "orchestra/testbench" : " ^8.0|^9.0 " ,
31+ "phpunit/phpunit" : " ^9.4|^ 10.1 "
3032 },
3133 "autoload" : {
3234 "psr-4" : {
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3- xsi : noNamespaceSchemaLocation =" vendor/phpunit/phpunit/phpunit.xsd"
43 bootstrap =" vendor/autoload.php"
54 colors =" true"
5+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.4/phpunit.xsd"
66>
7- < testsuites >
8- < testsuite name = " Test Suite " >
9- <directory >tests </directory >
10- </ testsuite >
11- </ testsuites >
12- < source >
13- < include >
14- <directory >app </directory >
15- </ include >
16- </ source >
17- <php >
18- <env name =" APP_NAME" value =" Laravel Deletable" />
19- <env name =" DB_CONNECTION" value =" sqlite" />
20- <env name =" DB_DATABASE" value =" :memory:" />
21- </php >
7+ < source >
8+ < include >
9+ <directory suffix = " .php " >src/ </directory >
10+ </ include >
11+ </ source >
12+ < testsuites >
13+ < testsuite name = " Test Suite " >
14+ <directory >tests </directory >
15+ </ testsuite >
16+ </ testsuites >
17+ <php >
18+ <env name =" APP_NAME" value =" Laravel Deletable" />
19+ <env name =" DB_CONNECTION" value =" sqlite" />
20+ <env name =" DB_DATABASE" value =" :memory:" />
21+ </php >
2222</phpunit >
23-
Original file line number Diff line number Diff line change 66
77use F9Web \LaravelDeletable \Exceptions \NoneDeletableModel ;
88use F9Web \LaravelDeletable \Tests \Models \User ;
9- use Illuminate \Foundation \Testing \RefreshDatabase ;
109
1110use function get_class ;
1211
1312class NoneDeletableUserMessageTest extends TestCase
1413{
15- use RefreshDatabase;
16-
1714 /**
1815 * @test
1916 * @throws \Exception
@@ -53,7 +50,7 @@ public function isDeletable(): bool
5350 {
5451 // the user with the email '[email protected] ' is a 5552 // core record and therefore not deletable
56- if ($ this ->email === 'rob @f9web.co.uk ' ) {
53+ if ($ this ->email === 'rob1 @f9web.co.uk ' ) {
5754 return $ this ->isCoreEntity ();
5855 }
5956
@@ -63,7 +60,7 @@ public function isDeletable(): bool
6360
6461 $ class = get_class ($ model );
6562
66- $ user = $ model ::query ()->create ($ record = ['email ' => 'rob @f9web.co.uk ' ]);
63+ $ user = $ model ::query ()->create ($ record = ['email ' => 'rob1 @f9web.co.uk ' ]);
6764
6865 $ this ->expectExceptionMessage (
6966 "[ {$ class } # {$ user ->getKey ()}] is a core record and therefore not deletable. This indicates " .
Original file line number Diff line number Diff line change 77use F9Web \LaravelDeletable \Exceptions \NoneDeletableModel ;
88use F9Web \LaravelDeletable \Tests \Models \NoneDeletableUser ;
99use F9Web \LaravelDeletable \Tests \Models \User ;
10- use Illuminate \Foundation \Testing \RefreshDatabase ;
1110
1211use function get_class ;
1312
1413class NoneDeletableUserTest extends TestCase
1514{
16- use RefreshDatabase;
17-
1815 /**
1916 * @test
2017 * @throws \Exception
You can’t perform that action at this time.
0 commit comments