"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

MongoDbSessionHandlerTest.php  (phplist-3.4.5.tgz):MongoDbSessionHandlerTest.php  (phplist-3.4.6.tgz)
skipping to change at line 14 skipping to change at line 14
* This file is part of the Symfony package. * This file is part of the Symfony package.
* *
* (c) Fabien Potencier <fabien@symfony.com> * (c) Fabien Potencier <fabien@symfony.com>
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandl er; use Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandl er;
/** /**
* @author Markus Bachmann <markus.bachmann@bachi.biz> * @author Markus Bachmann <markus.bachmann@bachi.biz>
* @group time-sensitive * @group time-sensitive
* @group legacy * @group legacy
*/ */
class MongoDbSessionHandlerTest extends TestCase class MongoDbSessionHandlerTest extends TestCase
{ {
/** /**
* @var \PHPUnit_Framework_MockObject_MockObject * @var MockObject
*/ */
private $mongo; private $mongo;
private $storage; private $storage;
public $options; public $options;
protected function setUp() protected function setUp()
{ {
parent::setUp(); parent::setUp();
if (\extension_loaded('mongodb')) { if (\extension_loaded('mongodb')) {
skipping to change at line 65 skipping to change at line 66
'data_field' => 'data', 'data_field' => 'data',
'time_field' => 'time', 'time_field' => 'time',
'expiry_field' => 'expires_at', 'expiry_field' => 'expires_at',
'database' => 'sf2-test', 'database' => 'sf2-test',
'collection' => 'session-test', 'collection' => 'session-test',
]; ];
$this->storage = new MongoDbSessionHandler($this->mongo, $this->options) ; $this->storage = new MongoDbSessionHandler($this->mongo, $this->options) ;
} }
/**
* @expectedException \InvalidArgumentException
*/
public function testConstructorShouldThrowExceptionForInvalidMongo() public function testConstructorShouldThrowExceptionForInvalidMongo()
{ {
$this->expectException('InvalidArgumentException');
new MongoDbSessionHandler(new \stdClass(), $this->options); new MongoDbSessionHandler(new \stdClass(), $this->options);
} }
/**
* @expectedException \InvalidArgumentException
*/
public function testConstructorShouldThrowExceptionForMissingOptions() public function testConstructorShouldThrowExceptionForMissingOptions()
{ {
$this->expectException('InvalidArgumentException');
new MongoDbSessionHandler($this->mongo, []); new MongoDbSessionHandler($this->mongo, []);
} }
public function testOpenMethodAlwaysReturnTrue() public function testOpenMethodAlwaysReturnTrue()
{ {
$this->assertTrue($this->storage->open('test', 'test'), 'The "open" meth od should always return true'); $this->assertTrue($this->storage->open('test', 'test'), 'The "open" meth od should always return true');
} }
public function testCloseMethodAlwaysReturnTrue() public function testCloseMethodAlwaysReturnTrue()
{ {
 End of changes. 6 change blocks. 
7 lines changed or deleted 4 lines changed or added

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