File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ function iAmAController(TokenContext $context) : void
2020{
2121}
2222
23+ #[PHP8 ] function iAmAFunctionWithAUnionTypeParameter (Session |TokenContext $ context ): void {}
24+
2325class ParamConverterListenerTest extends TestCase
2426{
2527 private $ kernel ;
@@ -49,12 +51,14 @@ public function it_converts_parameters() : void
4951 */
5052 public function it_skips_union_types () : void
5153 {
54+ if (version_compare (phpversion (), '8.0 ' ) < 0 ) {
55+ self ::markTestSkipped ('Union types are only available for PHP>=8.0 ' );
56+ }
57+
5258 $ request = new Request ();
5359 $ request ->setSession (new Session (new MockArraySessionStorage ()));
5460
55- $ method = function ($ context ) : void {
56- };
57- $ event = $ this ->createControllerEvent ($ method , $ request );
61+ $ event = $ this ->createControllerEvent ('Gyro\Bundle\MVCBundle\Tests\EventListener\iAmAFunctionWithAUnionTypeParameter ' , $ request );
5862
5963 $ this ->listener ->onKernelController ($ event );
6064
You can’t perform that action at this time.
0 commit comments