assertNull(Cookie::get('test_key')); } public function testGetReturnsDefault(): void { unset($_COOKIE['test_key']); $this->assertSame('default', Cookie::get('test_key', 'default')); } public function testGetReturnsValue(): void { $_COOKIE['test_key'] = 'hello'; $this->assertSame('hello', Cookie::get('test_key')); unset($_COOKIE['test_key']); } public function testDeleteUnsetsFromGlobal(): void { $_COOKIE['to_delete'] = 'value'; Cookie::delete('to_delete'); $this->assertArrayNotHasKey('to_delete', $_COOKIE); } public function testDefaultsAreCorrect(): void { $this->assertSame('/', Cookie::$path); $this->assertTrue(Cookie::$httponly); $this->assertFalse(Cookie::$secure); $this->assertSame('Lax', Cookie::$samesite); } }