summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-foundation/Tests/Session/SessionTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/http-foundation/Tests/Session/SessionTest.php')
-rw-r--r--vendor/symfony/http-foundation/Tests/Session/SessionTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/symfony/http-foundation/Tests/Session/SessionTest.php b/vendor/symfony/http-foundation/Tests/Session/SessionTest.php
index afa00fc7c3..e75b3321b0 100644
--- a/vendor/symfony/http-foundation/Tests/Session/SessionTest.php
+++ b/vendor/symfony/http-foundation/Tests/Session/SessionTest.php
@@ -260,4 +260,14 @@ 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();
+ }
}