summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-foundation/Tests/RequestMatcherTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/http-foundation/Tests/RequestMatcherTest.php')
-rw-r--r--vendor/symfony/http-foundation/Tests/RequestMatcherTest.php44
1 files changed, 22 insertions, 22 deletions
diff --git a/vendor/symfony/http-foundation/Tests/RequestMatcherTest.php b/vendor/symfony/http-foundation/Tests/RequestMatcherTest.php
index cc35ad637b..57e9c3d30f 100644
--- a/vendor/symfony/http-foundation/Tests/RequestMatcherTest.php
+++ b/vendor/symfony/http-foundation/Tests/RequestMatcherTest.php
@@ -34,20 +34,20 @@ class RequestMatcherTest extends TestCase
public function getMethodData()
{
- return array(
- array('get', 'get', true),
- array('get', array('get', 'post'), true),
- array('get', 'post', false),
- array('get', 'GET', true),
- array('get', array('GET', 'POST'), true),
- array('get', 'POST', false),
- );
+ return [
+ ['get', 'get', true],
+ ['get', ['get', 'post'], true],
+ ['get', 'post', false],
+ ['get', 'GET', true],
+ ['get', ['GET', 'POST'], true],
+ ['get', 'POST', false],
+ ];
}
public function testScheme()
{
$httpRequest = $request = $request = Request::create('');
- $httpsRequest = $request = $request = Request::create('', 'get', array(), array(), array(), array('HTTPS' => 'on'));
+ $httpsRequest = $request = $request = Request::create('', 'get', [], [], [], ['HTTPS' => 'on']);
$matcher = new RequestMatcher();
$matcher->matchScheme('https');
@@ -69,7 +69,7 @@ class RequestMatcherTest extends TestCase
public function testHost($pattern, $isMatch)
{
$matcher = new RequestMatcher();
- $request = Request::create('', 'get', array(), array(), array(), array('HTTP_HOST' => 'foo.example.com'));
+ $request = Request::create('', 'get', [], [], [], ['HTTP_HOST' => 'foo.example.com']);
$matcher->matchHost($pattern);
$this->assertSame($isMatch, $matcher->matches($request));
@@ -81,7 +81,7 @@ class RequestMatcherTest extends TestCase
public function testPort()
{
$matcher = new RequestMatcher();
- $request = Request::create('', 'get', array(), array(), array(), array('HTTP_HOST' => null, 'SERVER_PORT' => 8000));
+ $request = Request::create('', 'get', [], [], [], ['HTTP_HOST' => null, 'SERVER_PORT' => 8000]);
$matcher->matchPort(8000);
$this->assertTrue($matcher->matches($request));
@@ -89,22 +89,22 @@ class RequestMatcherTest extends TestCase
$matcher->matchPort(9000);
$this->assertFalse($matcher->matches($request));
- $matcher = new RequestMatcher(null, null, null, null, array(), null, 8000);
+ $matcher = new RequestMatcher(null, null, null, null, [], null, 8000);
$this->assertTrue($matcher->matches($request));
}
public function getHostData()
{
- return array(
- array('.*\.example\.com', true),
- array('\.example\.com$', true),
- array('^.*\.example\.com$', true),
- array('.*\.sensio\.com', false),
- array('.*\.example\.COM', true),
- array('\.example\.COM$', true),
- array('^.*\.example\.COM$', true),
- array('.*\.sensio\.COM', false),
- );
+ return [
+ ['.*\.example\.com', true],
+ ['\.example\.com$', true],
+ ['^.*\.example\.com$', true],
+ ['.*\.sensio\.com', false],
+ ['.*\.example\.COM', true],
+ ['\.example\.COM$', true],
+ ['^.*\.example\.COM$', true],
+ ['.*\.sensio\.COM', false],
+ ];
}
public function testPath()