Skip to content

Commit

Permalink
Add cookie test for get using default value
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansuter committed Jan 26, 2020
1 parent e4be5e0 commit b285c52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/CookiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,9 @@ public function testSetSameSiteCookieValuesAreCaseInsensitive()

public function testGet()
{
$cookies = new Cookies(['foo' => 'bar']);
$cookies = new Cookies(['foo' => 'bar', 'baz' => null]);
$this->assertEquals('bar', $cookies->get('foo'));
$this->assertNull($cookies->get('baz', 'defaultValue'));
$this->assertNull($cookies->get('missing'));
$this->assertEquals('defaultValue', $cookies->get('missing', 'defaultValue'));
}
Expand Down

0 comments on commit b285c52

Please sign in to comment.