/** * {@inheritdoc} */ public function cookie(string $key = null, $default = null) { return Arr::get($this->getCookieParams(), $key, $default); }
public function test_it_returns_a_default_value_for_empty_arrays() { $this->assertEquals('bar', Arr::unwrap([], 'bar')); }