You are here

public function RequestMatcherTest::testMethod in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/RequestMatcherTest.php \Symfony\Component\HttpFoundation\Tests\RequestMatcherTest::testMethod()

@dataProvider testMethodFixtures

File

vendor/symfony/http-foundation/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));
}