Fix unit tests

This commit is contained in:
Kijin Sung 2016-08-19 23:14:33 +09:00
parent c43f102aee
commit f3b30d8afc

View file

@ -5,7 +5,7 @@ class SessionTest extends \Codeception\TestCase\Test
public function _before() public function _before()
{ {
Rhymix\Framework\Session::close(); Rhymix\Framework\Session::close();
session_id('rhymix_test_session'); session_id('rhymix-test-session');
$_SESSION = array(); $_SESSION = array();
$_COOKIE = array(); $_COOKIE = array();
} }
@ -13,7 +13,7 @@ class SessionTest extends \Codeception\TestCase\Test
public function _after() public function _after()
{ {
Rhymix\Framework\Session::close(); Rhymix\Framework\Session::close();
session_id('rhymix_test_session'); session_id('rhymix-test-session');
$_SESSION = array(); $_SESSION = array();
$_COOKIE = array(); $_COOKIE = array();
} }
@ -21,7 +21,7 @@ class SessionTest extends \Codeception\TestCase\Test
public function _failed() public function _failed()
{ {
Rhymix\Framework\Session::close(); Rhymix\Framework\Session::close();
session_id('rhymix_test_session'); session_id('rhymix-test-session');
$_SESSION = array(); $_SESSION = array();
$_COOKIE = array(); $_COOKIE = array();
} }
@ -231,7 +231,7 @@ class SessionTest extends \Codeception\TestCase\Test
public function testGetSetLanguage() public function testGetSetLanguage()
{ {
Rhymix\Framework\Session::start(); Rhymix\Framework\Session::start();
$this->assertEquals(config('locale.default_language'), Rhymix\Framework\Session::getLanguage()); $this->assertEquals(\Context::getLangType(), Rhymix\Framework\Session::getLanguage());
Rhymix\Framework\Session::setLanguage('ja'); Rhymix\Framework\Session::setLanguage('ja');
$this->assertEquals('ja', Rhymix\Framework\Session::getLanguage()); $this->assertEquals('ja', Rhymix\Framework\Session::getLanguage());