We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92f9006 commit f9b1a2aCopy full SHA for f9b1a2a
tests/Session/SessionStoreTest.php
@@ -482,6 +482,17 @@ public function testRememberMethodCallsPutAndReturnsDefault()
482
$this->assertSame('bar', $result);
483
}
484
485
+ public function testRememberMethodReturnsPreviousValueIfItAlreadySets()
486
+ {
487
+ $session = $this->getSession();
488
+ $session->put('key', 'foo');
489
+ $result = $session->remember('key', function () {
490
+ return 'bar';
491
+ });
492
+ $this->assertSame('foo', $session->get('key'));
493
+ $this->assertSame('foo', $result);
494
+ }
495
+
496
public function getSession()
497
{
498
$reflection = new ReflectionClass(Store::class);
0 commit comments