Convert SessionManager to a factory class
This commit is contained in:
parent
5b0ee7651b
commit
de8c5e5dc7
10 changed files with 64 additions and 52 deletions
|
@ -6,7 +6,9 @@
|
|||
|
||||
namespace Alltube\Test;
|
||||
|
||||
use Alltube\LocaleManager;
|
||||
use Alltube\Exception\DependencyException;
|
||||
use Alltube\Factory\LocaleManagerFactory;
|
||||
use Alltube\Factory\SessionFactory;
|
||||
use Alltube\Middleware\LocaleMiddleware;
|
||||
use Slim\Container;
|
||||
use Slim\Http\Environment;
|
||||
|
@ -34,11 +36,13 @@ class LocaleMiddlewareTest extends BaseTest
|
|||
|
||||
/**
|
||||
* Prepare tests.
|
||||
* @throws DependencyException
|
||||
*/
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->container = new Container();
|
||||
$this->container['locale'] = new LocaleManager();
|
||||
$this->container['session'] = SessionFactory::create();
|
||||
$this->container['locale'] = LocaleManagerFactory::create($this->container);
|
||||
$this->middleware = new LocaleMiddleware($this->container);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue