1212namespace Symfony \Component \Routing \Tests \Matcher ;
1313
1414use PHPUnit \Framework \TestCase ;
15+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
1516use Symfony \Component \Routing \Exception \MethodNotAllowedException ;
1617use Symfony \Component \Routing \Exception \ResourceNotFoundException ;
1718use Symfony \Component \Routing \Matcher \UrlMatcher ;
2122
2223class UrlMatcherTest extends TestCase
2324{
25+ use ForwardCompatTestTrait;
26+
2427 public function testNoMethodSoAllowed ()
2528 {
2629 $ coll = new RouteCollection ();
2730 $ coll ->add ('foo ' , new Route ('/foo ' ));
2831
2932 $ matcher = $ this ->getUrlMatcher ($ coll );
30- $ this ->assertInternalType ( ' array ' , $ matcher ->match ('/foo ' ));
33+ $ this ->assertIsArray ( $ matcher ->match ('/foo ' ));
3134 }
3235
3336 public function testMethodNotAllowed ()
@@ -66,7 +69,7 @@ public function testHeadAllowedWhenRequirementContainsGet()
6669 $ coll ->add ('foo ' , new Route ('/foo ' , [], [], [], '' , [], ['get ' ]));
6770
6871 $ matcher = $ this ->getUrlMatcher ($ coll , new RequestContext ('' , 'head ' ));
69- $ this ->assertInternalType ( ' array ' , $ matcher ->match ('/foo ' ));
72+ $ this ->assertIsArray ( $ matcher ->match ('/foo ' ));
7073 }
7174
7275 public function testMethodNotAllowedAggregatesAllowedMethods ()
@@ -108,7 +111,7 @@ public function testMatch()
108111 $ collection = new RouteCollection ();
109112 $ collection ->add ('foo ' , new Route ('/foo ' , [], [], [], '' , [], ['get ' , 'head ' ]));
110113 $ matcher = $ this ->getUrlMatcher ($ collection );
111- $ this ->assertInternalType ( ' array ' , $ matcher ->match ('/foo ' ));
114+ $ this ->assertIsArray ( $ matcher ->match ('/foo ' ));
112115
113116 // route does not match with POST method context
114117 $ matcher = $ this ->getUrlMatcher ($ collection , new RequestContext ('' , 'post ' ));
@@ -120,9 +123,9 @@ public function testMatch()
120123
121124 // route does match with GET or HEAD method context
122125 $ matcher = $ this ->getUrlMatcher ($ collection );
123- $ this ->assertInternalType ( ' array ' , $ matcher ->match ('/foo ' ));
126+ $ this ->assertIsArray ( $ matcher ->match ('/foo ' ));
124127 $ matcher = $ this ->getUrlMatcher ($ collection , new RequestContext ('' , 'head ' ));
125- $ this ->assertInternalType ( ' array ' , $ matcher ->match ('/foo ' ));
128+ $ this ->assertIsArray ( $ matcher ->match ('/foo ' ));
126129
127130 // route with an optional variable as the first segment
128131 $ collection = new RouteCollection ();
0 commit comments