"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/framework/web/session/AbstractDbSessionTest.php" between
yii2-2.0.35.tar.gz and yii2-2.0.36.tar.gz

About: Yii 2 is a high-performance component-based PHP framework for developing large-scale Web applications (source).

AbstractDbSessionTest.php  (yii2-2.0.35):AbstractDbSessionTest.php  (yii2-2.0.36)
skipping to change at line 162 skipping to change at line 162
* @depends testReadWrite * @depends testReadWrite
*/ */
public function testWriteCustomFieldWithUserId() public function testWriteCustomFieldWithUserId()
{ {
$session = new DbSession(); $session = new DbSession();
$session->open(); $session->open();
$session->set('user_id', 12345); $session->set('user_id', 12345);
// add mapped custom column // add mapped custom column
$migration = new Migration; $migration = new Migration;
$migration->compact = true;
$migration->addColumn($session->sessionTable, 'user_id', $migration->int eger()); $migration->addColumn($session->sessionTable, 'user_id', $migration->int eger());
$session->writeCallback = function ($session) { $session->writeCallback = function ($session) {
return ['user_id' => $session['user_id']]; return ['user_id' => $session['user_id']];
}; };
// here used to be error, fixed issue #9438 // here used to be error, fixed issue #9438
$session->close(); $session->close();
// reopen & read session from DB // reopen & read session from DB
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)