refactoring

This commit is contained in:
Milos Stojanovic
2019-06-14 13:34:21 +02:00
parent fa319eda36
commit b945526c85
8 changed files with 20 additions and 42 deletions

View File

@@ -10,9 +10,7 @@
namespace Tests\Unit\Auth;
use Filegator\Kernel\Request;
use Filegator\Services\Auth\Adapters\Database;
use Filegator\Services\Session\Adapters\SessionStorage;
/**
* @internal
@@ -23,17 +21,7 @@ class DatabaseAuthTest extends AuthTest
public function setAuth()
{
$session = new SessionStorage(new Request());
$session->init([
'session_handler' => 'mockfilesession',
'available' => [
'mockfilesession' => function () {
return new \Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage();
},
],
]);
$this->auth = new Database($session);
$this->auth = new Database($this->session);
$this->auth->init([
'driver' => 'pdo',
'dsn' => 'sqlite::memory:',