Skip to content

Commit 7b36d0c

Browse files
author
Drak
committed
[DoctrineBridge][HttpFoundation] Refactored tests.
1 parent 39526df commit 7b36d0c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tests/Symfony/Tests/Bridge/Doctrine/HttpFoundation/DbalSessionStorageTest.php renamed to tests/Symfony/Tests/Bridge/Doctrine/HttpFoundation/DbalSessionHandlerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111

1212
namespace Symfony\Bridge\Doctrine\HttpFoundation;
1313

14-
use Symfony\Bridge\Doctrine\HttpFoundation\DbalSessionStorage;
14+
use Symfony\Bridge\Doctrine\HttpFoundation\DbalSessionHandler;
1515

1616
/**
1717
* Test class for DbalSessionStorage.
1818
*
1919
* @author Drak <drak@zikula.org>
2020
*/
21-
class DbalSessionStorageTest extends \PHPUnit_Framework_TestCase
21+
class DbalSessionHandlerTest extends \PHPUnit_Framework_TestCase
2222
{
2323
public function test__Construct()
2424
{
2525
$this->connection = $this->getMock('Doctrine\DBAL\Driver\Connection');
26-
$mock = $this->getMockBuilder('Symfony\Bridge\Doctrine\HttpFoundation\DbalSessionStorage');
26+
$mock = $this->getMockBuilder('Symfony\Bridge\Doctrine\HttpFoundation\DbalSessionHandler');
2727
$mock->setConstructorArgs(array($this->connection));
2828
$this->driver = $mock->getMock();
2929
}

tests/Symfony/Tests/Component/HttpFoundation/Session/Storage/PdoSessionStorageTest.php renamed to tests/Symfony/Tests/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandlerTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Tests\Component\HttpFoundation\Session\Storage;
12+
namespace Symfony\Tests\Component\HttpFoundation\Session\Storage\Handler;
1313

14-
use Symfony\Component\HttpFoundation\Session\Storage\PdoSessionStorage;
14+
use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler;
1515

16-
class PdoSessionStorageTest extends \PHPUnit_Framework_TestCase
16+
class PdoSessionHandlerTest extends \PHPUnit_Framework_TestCase
1717
{
1818
private $pdo;
1919

@@ -26,16 +26,16 @@ protected function setUp()
2626

2727
public function testMultipleInstances()
2828
{
29-
$storage1 = new PdoSessionStorage($this->pdo, array('db_table' => 'sessions'), array());
29+
$storage1 = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'), array());
3030
$storage1->write('foo', 'bar');
3131

32-
$storage2 = new PdoSessionStorage($this->pdo, array('db_table' => 'sessions'), array());
32+
$storage2 = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'), array());
3333
$this->assertEquals('bar', $storage2->read('foo'), 'values persist between instances');
3434
}
3535

3636
public function testSessionDestroy()
3737
{
38-
$storage = new PdoSessionStorage($this->pdo, array('db_table' => 'sessions'), array());
38+
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'), array());
3939
$storage->write('foo', 'bar');
4040
$this->assertEquals(1, count($this->pdo->query('SELECT * FROM sessions')->fetchAll()));
4141

@@ -46,7 +46,7 @@ public function testSessionDestroy()
4646

4747
public function testSessionGC()
4848
{
49-
$storage = new PdoSessionStorage($this->pdo, array('db_table' => 'sessions'), array());
49+
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'sessions'), array());
5050

5151
$storage->write('foo', 'bar');
5252
$storage->write('baz', 'bar');

0 commit comments

Comments
 (0)