Codeception / Codeception/module-phalcon4

SessionManager methods missing

Abierto
#13 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
PHP
Estrellas
3
Forks
8
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

When my tests tried to run a test that involved a session destroy, I got an error. Because `MemorySession.php` doesn't actually start the session using `session_start`, `session_destroy` doesn't work either.

Also, `MemorySession.php`'s get and set methods aren't actually used, because the get and set are called from `SessionManager.php`.

I fixed this by adding methods to `SessionManager.php`:

```php
class SessionManager extends Manager
{
//...

public function destroy(): void
{
$this->getAdapter()->destroy($this->getId());
}

public function get(string $key, $defaultValue = null, bool $remove = false)
{
return $this->getAdapter()->get($key, $defaultValue, $remove);
}

public function set(string $key, $value): void
{
$this->getAdapter()->set($key, $value);
}
}

```

Please let me know if this is correct, or if I'm missing something.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.