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

@@ -41,12 +41,12 @@ class HttpCacheTestCase extends TestCase
$this->cache = null;
$this->esi = null;
$this->caches = array();
$this->cacheConfig = array();
$this->caches = [];
$this->cacheConfig = [];
$this->request = null;
$this->response = null;
$this->responses = array();
$this->responses = [];
$this->catch = false;
@@ -112,7 +112,7 @@ class HttpCacheTestCase extends TestCase
$this->assertFalse($this->kernel->isCatchingExceptions());
}
public function request($method, $uri = '/', $server = array(), $cookies = array(), $esi = false, $headers = array())
public function request($method, $uri = '/', $server = [], $cookies = [], $esi = false, $headers = [])
{
if (null === $this->kernel) {
throw new \LogicException('You must call setNextResponse() before calling request().');
@@ -126,7 +126,7 @@ class HttpCacheTestCase extends TestCase
$this->esi = $esi ? new Esi() : null;
$this->cache = new HttpCache($this->kernel, $this->store, $this->esi, $this->cacheConfig);
$this->request = Request::create($uri, $method, array(), $cookies, array(), $server);
$this->request = Request::create($uri, $method, [], $cookies, [], $server);
$this->request->headers->add($headers);
$this->response = $this->cache->handle($this->request, HttpKernelInterface::MASTER_REQUEST, $this->catch);
@@ -136,7 +136,7 @@ class HttpCacheTestCase extends TestCase
public function getMetaStorageValues()
{
$values = array();
$values = [];
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(sys_get_temp_dir().'/http_cache/md', \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
$values[] = file_get_contents($file);
}
@@ -145,7 +145,7 @@ class HttpCacheTestCase extends TestCase
}
// A basic response with 200 status code and a tiny body.
public function setNextResponse($statusCode = 200, array $headers = array(), $body = 'Hello World', \Closure $customizer = null)
public function setNextResponse($statusCode = 200, array $headers = [], $body = 'Hello World', \Closure $customizer = null)
{
$this->kernel = new TestHttpKernel($body, $statusCode, $headers, $customizer);
}
@@ -168,7 +168,7 @@ class HttpCacheTestCase extends TestCase
$fp = opendir($directory);
while (false !== $file = readdir($fp)) {
if (!\in_array($file, array('.', '..'))) {
if (!\in_array($file, ['.', '..'])) {
if (is_link($directory.'/'.$file)) {
unlink($directory.'/'.$file);
} elseif (is_dir($directory.'/'.$file)) {