Skip to content

Commit

Permalink
[9.x] Added argument transformNullToEmptyString to the functions old(…
Browse files Browse the repository at this point in the history
…) and … (#35853)

* Added argument transformNullToEmptyString to the functions old() and getOldInput() and added tests

* Removed argument transformNullToEmptyString from the functions old() and getOldInput()
  • Loading branch information
Loots-it authored Jan 12, 2021
1 parent b026c12 commit 4a45e56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Session/SessionStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function testOldInputFlashing()
{
$session = $this->getSession();
$session->put('boom', 'baz');
$session->flashInput(['foo' => 'bar', 'bar' => 0]);
$session->flashInput(['foo' => 'bar', 'bar' => 0, 'name' => null]);

$this->assertTrue($session->hasOldInput('foo'));
$this->assertSame('bar', $session->getOldInput('foo'));
Expand All @@ -239,6 +239,9 @@ public function testOldInputFlashing()
$this->assertSame('bar', $session->getOldInput('foo'));
$this->assertEquals(0, $session->getOldInput('bar'));
$this->assertFalse($session->hasOldInput('boom'));

$this->assertSame('default', $session->getOldInput('input', 'default'));
$this->assertSame(null, $session->getOldInput('name', 'default'));
}

public function testDataFlashing()
Expand Down

0 comments on commit 4a45e56

Please sign in to comment.