8000 [9.x] Added argument transformNullToEmptyString to the functions old(… · laravel/framework@4a45e56 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4a45e56

Browse files
authored
[9.x] Added argument transformNullToEmptyString to the functions old() and … (#35853)
* Added argument transformNullToEmptyString to the functions old() and getOldInput() and added tests * Removed argument transformNullToEmptyString from the functions old() and getOldInput()
1 parent b026c12 commit 4a45e56

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/Session/SessionStoreTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public function testOldInputFlashing()
226226
{
227227
$session = $this->getSession();
228228
$session->put('boom', 'baz');
229-
$session->flashInput(['foo' => 'bar', 'bar' => 0]);
229+
$session->flashInput(['foo' => 'bar', 'bar' => 0, 'name' => null]);
230230

231231
$this->assertTrue($session->hasOldInput('foo'));
232232
$this->assertSame('bar', $session->getOldInput('foo'));
@@ -239,6 +239,9 @@ public function testOldInputFlashing()
239239
$this->assertSame('bar', $session->getOldInput('foo'));
240240
$this->assertEquals(0, $session->getOldInput('bar'));
241241
$this->assertFalse($session->hasOldInput('boom'));
242+
243+
$this->assertSame('default', $session->getOldInput('input', 'default'));
244+
$this->assertSame(null, $session->getOldInput('name', 'default'));
242245
}
243246

244247
public function testDataFlashing()

0 commit comments

Comments
 (0)
0