RequestMatcher example

/** * @group legacy */
class RequestMatcherTest extends TestCase
{
    /** * @dataProvider getMethodData */
    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));
    }

    public static function getMethodData()
    {
        
Home | Imprint | This part of the site doesn't use cookies.