File tree Expand file tree Collapse file tree 6 files changed +24
-4
lines changed
Expand file tree Collapse file tree 6 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 5555 ini-values : zend.exception_ignore_args=false
5656 tools : flex
5757
58+ - name : Downgrade PHPUnit for PHP 8.1
59+ if : matrix.php == '8.1'
60+ run : |
61+ composer require --dev --no-update phpunit/phpunit:^10.5
62+ sed -i 's/failOnPhpunitDeprecation="true"//g' phpunit.dist.xml
63+
5864 - name : Install Dependencies
5965 uses : ramsey/composer-install@v3
6066 with :
Original file line number Diff line number Diff line change 4747 },
4848 "require-dev" : {
4949 "doctrine/common" : " ^3.2" ,
50- "phpunit/phpunit" : " ^10 .5" ,
50+ "phpunit/phpunit" : " ^11 .5" ,
5151 "symfony/cache" : " ^5.4 || ^6.4 || ^7.0" ,
5252 "symfony/doctrine-messenger" : " ^5.4 || ^6.4 || ^7.0" ,
5353 "symfony/expression-language" : " ^5.4 || ^6.4 || ^7.0" ,
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 =" https://schema. phpunit.de/10.5 /phpunit.xsd"
3+ xsi : noNamespaceSchemaLocation =" vendor/ phpunit/phpunit /phpunit.xsd"
44 beStrictAboutOutputDuringTests =" true"
55 beStrictAboutTestsThatDoNotTestAnything =" true"
66 bootstrap =" vendor/autoload.php"
77 cacheDirectory =" .phpunit.cache"
88 colors =" true"
9+ failOnEmptyTestSuite =" true"
10+ failOnIncomplete =" true"
11+ failOnNotice =" true"
12+ failOnPhpunitDeprecation =" true"
913 failOnRisky =" true"
1014 failOnWarning =" true"
1115>
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ public static function setUpBeforeClass(): void
3636 self ::initializeApplication (['test_case ' => 'TestApplication ' ]);
3737
3838 self ::$ configuration = self ::getContainer ()->get ('sofascore.purgatory.configuration_loader ' )->load ();
39+
40+ self ::ensureKernelShutdown ();
3941 }
4042
4143 public static function tearDownAfterClass (): void
Original file line number Diff line number Diff line change 1111use Symfony \Component \DependencyInjection \ContainerBuilder ;
1212use Symfony \Component \DependencyInjection \Definition ;
1313use Symfony \Component \DependencyInjection \Loader \PhpFileLoader ;
14+ use Symfony \Component \ErrorHandler \ErrorHandler ;
1415use Symfony \Component \HttpKernel \Kernel ;
1516
1617final class TestKernel extends Kernel
@@ -64,6 +65,15 @@ public function registerBundles(): iterable
6465 yield new PurgatoryBundle ();
6566 }
6667
68+ public function shutdown (): void
69+ {
70+ $ handler = set_exception_handler ('var_dump ' );
71+ restore_exception_handler ();
72+ if (\is_array ($ handler ) && $ handler [0 ] instanceof ErrorHandler) {
73+ restore_exception_handler ();
74+ }
75+ }
76+
6777 public function registerContainerConfiguration (LoaderInterface $ loader ): void
6878 {
6979 $ loader ->load (function (ContainerBuilder $ container ) use ($ loader ) {
Original file line number Diff line number Diff line change 44
55namespace Sofascore \PurgatoryBundle \Tests \Test ;
66
7- use PHPUnit \Framework \Attributes \CoversClass ;
87use PHPUnit \Framework \Attributes \DataProvider ;
98use PHPUnit \Framework \TestCase ;
109use Sofascore \PurgatoryBundle \Purger \AsyncPurger ;
1817use Symfony \Component \DependencyInjection \Container ;
1918use Symfony \Component \Messenger \MessageBusInterface ;
2019
21- #[CoversClass(InteractsWithPurgatory::class)]
2220final class InteractsWithPurgatoryTest extends TestCase
2321{
2422 #[DataProvider('provideTraitTestCases ' )]
You can’t perform that action at this time.
0 commit comments