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 ()
@@ -114,7 +117,7 @@ public function testMethodIsIgnoredIfNoMethodGiven()
114117 $ collection = new RouteCollection ();
115118 $ collection ->add ('foo ' , new Route ('/foo ' , [], [], [], '' , [], ['get ' , 'head ' ]));
116119 $ matcher = $ this ->getUrlMatcher ($ collection );
117- $ this ->assertInternalType ( ' array ' , $ matcher ->match ('/foo ' ));
120+ $ this ->assertIsArray ( $ matcher ->match ('/foo ' ));
118121
119122 // route does not match with POST method context
120123 $ matcher = $ this ->getUrlMatcher ($ collection , new RequestContext ('' , 'post ' ));
@@ -126,9 +129,9 @@ public function testMethodIsIgnoredIfNoMethodGiven()
126129
127130 // route does match with GET or HEAD method context
128131 $ matcher = $ this ->getUrlMatcher ($ collection );
129- $ this ->assertInternalType ( ' array ' , $ matcher ->match ('/foo ' ));
132+ $ this ->assertIsArray ( $ matcher ->match ('/foo ' ));
130133 $ matcher = $ this ->getUrlMatcher ($ collection , new RequestContext ('' , 'head ' ));
131- $ this ->assertInternalType ( ' array ' , $ matcher ->match ('/foo ' ));
134+ $ this ->assertIsArray ( $ matcher ->match ('/foo ' ));
132135 }
133136
134137 public function testRouteWithOptionalVariableAsFirstSegment ()
0 commit comments