$this->
assertSame($expected,
$expressionRequestMatcher->
matches($request));
} /**
* @dataProvider provideExpressions
*/
public function testMatchesWhenParentMatchesIsFalse($expression) { $request = Request::
create('/foo'
);
$request->attributes->
set('foo', 'foo'
);
$expressionRequestMatcher =
new ExpressionRequestMatcher();
$expressionRequestMatcher->
matchAttribute('foo', 'bar'
);
$expressionRequestMatcher->
setExpression(new ExpressionLanguage(),
$expression);
$this->
assertFalse($expressionRequestMatcher->
matches($request));
} public static function provideExpressions() { return [ ['request.getMethod() == method', true
],
['request.getPathInfo() == path', true
],
['request.getHost() == host', true
],
[