You are here

public function ExpressionRequestMatcherTest::provideExpressions in Zircon Profile 8

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

File

vendor/symfony/http-foundation/Tests/ExpressionRequestMatcherTest.php, line 55

Class

ExpressionRequestMatcherTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function provideExpressions() {
  return array(
    array(
      'request.getMethod() == method',
      true,
    ),
    array(
      'request.getPathInfo() == path',
      true,
    ),
    array(
      'request.getHost() == host',
      true,
    ),
    array(
      'request.getClientIp() == ip',
      true,
    ),
    array(
      'request.attributes.all() == attributes',
      true,
    ),
    array(
      'request.getMethod() == method && request.getPathInfo() == path && request.getHost() == host && request.getClientIp() == ip &&  request.attributes.all() == attributes',
      true,
    ),
    array(
      'request.getMethod() != method',
      false,
    ),
    array(
      'request.getMethod() != method && request.getPathInfo() == path && request.getHost() == host && request.getClientIp() == ip &&  request.attributes.all() == attributes',
      false,
    ),
  );
}