Skip to content

Commit 060f552

Browse files
Merge branch '4.3' into 4.4
* 4.3: Fix assertInternalType deprecation in phpunit 9 Micro-typo fix
2 parents 3d15336 + 822764e commit 060f552

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Tests/Matcher/UrlMatcherTest.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Routing\Tests\Matcher;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1516
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
1617
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
1718
use Symfony\Component\Routing\Matcher\UrlMatcher;
@@ -21,13 +22,15 @@
2122

2223
class 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

Comments
 (0)