summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-foundation
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/http-foundation')
-rw-r--r--vendor/symfony/http-foundation/Session/Session.php4
-rw-r--r--vendor/symfony/http-foundation/Tests/ResponseTest.php7
-rw-r--r--vendor/symfony/http-foundation/Tests/Session/SessionTest.php10
3 files changed, 5 insertions, 16 deletions
diff --git a/vendor/symfony/http-foundation/Session/Session.php b/vendor/symfony/http-foundation/Session/Session.php
index 62ce948b68..867ceba97f 100644
--- a/vendor/symfony/http-foundation/Session/Session.php
+++ b/vendor/symfony/http-foundation/Session/Session.php
@@ -193,9 +193,7 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable
*/
public function save()
{
- if ($this->isStarted()) {
- $this->storage->save();
- }
+ $this->storage->save();
}
/**
diff --git a/vendor/symfony/http-foundation/Tests/ResponseTest.php b/vendor/symfony/http-foundation/Tests/ResponseTest.php
index adfae08b9e..7856a77c03 100644
--- a/vendor/symfony/http-foundation/Tests/ResponseTest.php
+++ b/vendor/symfony/http-foundation/Tests/ResponseTest.php
@@ -1004,14 +1004,15 @@ class ResponseTest extends ResponseTestCase
$ianaHttpStatusCodes = new \DOMDocument();
- libxml_set_streams_context(stream_context_create([
+ $context = stream_context_create([
'http' => [
'method' => 'GET',
'timeout' => 30,
+ 'user_agent' => __METHOD__,
],
- ]));
+ ]);
- $ianaHttpStatusCodes->load('https://www.iana.org/assignments/http-status-codes/http-status-codes.xml');
+ $ianaHttpStatusCodes->loadXML(file_get_contents('https://www.iana.org/assignments/http-status-codes/http-status-codes.xml', false, $context));
if (!$ianaHttpStatusCodes->relaxNGValidate(__DIR__.'/schema/http-status-codes.rng')) {
self::fail('Invalid IANA\'s HTTP status code list.');
}
diff --git a/vendor/symfony/http-foundation/Tests/Session/SessionTest.php b/vendor/symfony/http-foundation/Tests/Session/SessionTest.php
index e75b3321b0..afa00fc7c3 100644
--- a/vendor/symfony/http-foundation/Tests/Session/SessionTest.php
+++ b/vendor/symfony/http-foundation/Tests/Session/SessionTest.php
@@ -260,14 +260,4 @@ class SessionTest extends TestCase
$flash->get('hello');
$this->assertTrue($this->session->isEmpty());
}
-
- public function testSaveIfNotStarted()
- {
- $storage = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface')->getMock();
- $session = new Session($storage);
-
- $storage->expects($this->once())->method('isStarted')->willReturn(false);
- $storage->expects($this->never())->method('save');
- $session->save();
- }
}