updated packages

This commit is contained in:
2019-05-18 09:06:43 +00:00
parent 901d16349e
commit e9487fa58a
2025 changed files with 30366 additions and 49653 deletions

View File

@@ -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()