Rewrite of session management

This commit is contained in:
Frederic Guillot
2015-11-15 12:50:33 -05:00
parent 2fc402f673
commit a675271ad7
72 changed files with 793 additions and 466 deletions

View File

@@ -3,7 +3,7 @@
require_once __DIR__.'/../Base.php';
use Kanboard\Model\Config;
use Kanboard\Core\Session;
use Kanboard\Core\Session\SessionManager;
class ConfigTest extends Base
{
@@ -73,17 +73,15 @@ class ConfigTest extends Base
public function testGetWithSession()
{
$this->container['session'] = new Session;
$c = new Config($this->container);
session_id('test');
$this->assertTrue(Session::isOpen());
$this->assertTrue(SessionManager::isOpen());
$this->assertEquals('', $c->get('board_columns'));
$this->assertEquals('test', $c->get('board_columns', 'test'));
$this->container['session']['config'] = array(
$this->container['sessionStorage']->config = array(
'board_columns' => 'foo',
'empty_value' => 0
);
@@ -93,6 +91,6 @@ class ConfigTest extends Base
$this->assertEquals('test', $c->get('empty_value', 'test'));
session_id('');
unset($this->container['session']);
$this->assertFalse(SessionManager::isOpen());
}
}