Skip to content

Commit

Permalink
rename method to expire
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Apr 21, 2021
1 parent 62c8fc0 commit fa3a14f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Cookie/CookieJar.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function queue(...$parameters)
* @param string|null $domain
* @return void
*/
public function queueForget($name, $path = null, $domain = null)
public function expire($name, $path = null, $domain = null)
{
$this->queue($this->forget($name, $path, $domain));
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Cookie/CookieTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ public function testHasQueuedWithPath(): void
$this->assertFalse($cookieJar->hasQueued('foo', '/wrongPath'));
}

public function testQueueForget()
public function testExpire()
{
$cookieJar = $this->getCreator();
$this->assertCount(0, $cookieJar->getQueuedCookies());

$cookieJar->queueForget('foobar', '/path', '/domain');
$cookieJar->expire('foobar', '/path', '/domain');

$cookie = $cookieJar->queued('foobar');
$this->assertEquals('foobar', $cookie->getName());
Expand Down

0 comments on commit fa3a14f

Please sign in to comment.