File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed
Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 1818 - 8.1
1919 - 8.2
2020 - 8.3
21+ phpunit :
22+ - 10
23+ - 11
24+ exclude :
25+ - php : 8.1
26+ phpunit : 11
2127
2228 steps :
2329 - uses : actions/checkout@v4
2834 php-version : ${{ matrix.php }}
2935 coverage : pcov
3036
37+ - name : Filter PHPUnit version constraint
38+ run : ' sed -i '' s/\("phpunit\/phpunit" *: *\)\("\||\).*\(\^${{ matrix.phpunit }}\b[^|"]*\)\(|\|"\).*/\1"\3"/''
39+ composer.json'
40+
3141 - name : Validate composer.json
3242 run : composer validate
3343
3646 uses : actions/cache@v4
3747 with :
3848 path : vendor
39- key : php-${{ matrix.php }}
49+ key : php-${{ matrix.php }}-${{ matrix.phpunit }}
4050
4151 - name : Install dependencies
4252 run : composer update --no-interaction --no-progress
Original file line number Diff line number Diff line change 99 ],
1010 "require" : {
1111 "php" : " >=8.1" ,
12- "phpunit/phpunit" : " ^10.5.28"
12+ "phpunit/phpunit" : " ^10.5.28|^11.2.8 "
1313 },
1414 "autoload" : {
1515 "psr-4" : {
Original file line number Diff line number Diff line change 11<?php
22namespace ScriptFUSIONTest \Pip ;
33
4+ use PHPUnit \Framework \Attributes \DataProvider ;
45use PHPUnit \Framework \TestCase ;
56
67/**
@@ -74,9 +75,8 @@ function unserialize(string $data) {}
7475 self ::assertTrue (true );
7576 }
7677
77- /**
78- * @dataProvider provideData
79- */
78+ #[DataProvider('provideData ' )]
79+
8080 public function testDataProvider (): void
8181 {
8282 self ::assertTrue (true );
@@ -90,9 +90,7 @@ public static function provideData(): iterable
9090 ];
9191 }
9292
93- /**
94- * @dataProvider provideSuccessesAndFailures
95- */
93+ #[DataProvider('provideSuccessesAndFailures ' )]
9694 public function testSuccessAfterFailure ($ bool ): void
9795 {
9896 self ::assertTrue ($ bool );
You can’t perform that action at this time.
0 commit comments