From fa3a14f4da763a9a95162dc4092d5ab7356e0cb8 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 21 Apr 2021 13:36:41 -0500 Subject: [PATCH] rename method to expire --- src/Illuminate/Cookie/CookieJar.php | 2 +- tests/Cookie/CookieTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Cookie/CookieJar.php b/src/Illuminate/Cookie/CookieJar.php index 4f5380982b49..45f15f70e0ff 100755 --- a/src/Illuminate/Cookie/CookieJar.php +++ b/src/Illuminate/Cookie/CookieJar.php @@ -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)); } diff --git a/tests/Cookie/CookieTest.php b/tests/Cookie/CookieTest.php index 90e23bd041e3..5f5a3f906f67 100755 --- a/tests/Cookie/CookieTest.php +++ b/tests/Cookie/CookieTest.php @@ -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());