Skip to content

Commit 96efebc

Browse files
committed
fix tests
1 parent 441b2e5 commit 96efebc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Tests/EventListener/CookieClearingLogoutListenerTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ public function testLogout()
4343
$this->assertEquals('foo.foo', $cookie->getDomain());
4444
$this->assertEquals(Cookie::SAMESITE_STRICT, $cookie->getSameSite());
4545
$this->assertTrue($cookie->isSecure());
46-
$this->assertTrue($cookie->isPartitioned());
46+
if (method_exists(Cookie::class, 'isPartitioned')) {
47+
$this->assertTrue($cookie->isPartitioned());
48+
}
4749
$this->assertTrue($cookie->isCleared());
4850

4951
$cookie = $cookies['']['/']['foo2'];
@@ -52,7 +54,9 @@ public function testLogout()
5254
$this->assertNull($cookie->getDomain());
5355
$this->assertNull($cookie->getSameSite());
5456
$this->assertFalse($cookie->isSecure());
55-
$this->assertFalse($cookie->isPartitioned());
57+
if (method_exists(Cookie::class, 'isPartitioned')) {
58+
$this->assertFalse($cookie->isPartitioned());
59+
}
5660
$this->assertTrue($cookie->isCleared());
5761
}
5862
}

0 commit comments

Comments
 (0)