public function RequestMatcherTest::testMethod

@dataProvider testMethodFixtures

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php, line 22

Class

RequestMatcherTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testMethod($requestMethod, $matcherMethod, $isMatch) {
  $matcher = new RequestMatcher();
  $matcher
    ->matchMethod($matcherMethod);
  $request = Request::create('', $requestMethod);
  $this
    ->assertSame($isMatch, $matcher
    ->matches($request));
  $matcher = new RequestMatcher(null, null, $matcherMethod);
  $request = Request::create('', $requestMethod);
  $this
    ->assertSame($isMatch, $matcher
    ->matches($request));
}