9
9
* file that was distributed with this source code.
10
10
*/
11
11
12
- namespace Symfony \Tests \Component \HttpFoundation \Session \Storage ;
12
+ namespace Symfony \Tests \Component \HttpFoundation \Session \Storage \ Handler ;
13
13
14
- use Symfony \Component \HttpFoundation \Session \Storage \PdoSessionStorage ;
14
+ use Symfony \Component \HttpFoundation \Session \Storage \Handler \ PdoSessionHandler ;
15
15
16
- class PdoSessionStorageTest extends \PHPUnit_Framework_TestCase
16
+ class PdoSessionHandlerTest extends \PHPUnit_Framework_TestCase
17
17
{
18
18
private $ pdo ;
19
19
@@ -26,16 +26,16 @@ protected function setUp()
26
26
27
27
public function testMultipleInstances ()
28
28
{
29
- $ storage1 = new PdoSessionStorage ($ this ->pdo , array ('db_table ' => 'sessions ' ), array ());
29
+ $ storage1 = new PdoSessionHandler ($ this ->pdo , array ('db_table ' => 'sessions ' ), array ());
30
30
$ storage1 ->write ('foo ' , 'bar ' );
31
31
32
- $ storage2 = new PdoSessionStorage ($ this ->pdo , array ('db_table ' => 'sessions ' ), array ());
32
+ $ storage2 = new PdoSessionHandler ($ this ->pdo , array ('db_table ' => 'sessions ' ), array ());
33
33
$ this ->assertEquals ('bar ' , $ storage2 ->read ('foo ' ), 'values persist between instances ' );
34
34
}
35
35
36
36
public function testSessionDestroy ()
37
37
{
38
- $ storage = new PdoSessionStorage ($ this ->pdo , array ('db_table ' => 'sessions ' ), array ());
38
+ $ storage = new PdoSessionHandler ($ this ->pdo , array ('db_table ' => 'sessions ' ), array ());
39
39
$ storage ->write ('foo ' , 'bar ' );
40
40
$ this ->assertEquals (1 , count ($ this ->pdo ->query ('SELECT * FROM sessions ' )->fetchAll ()));
41
41
@@ -46,7 +46,7 @@ public function testSessionDestroy()
46
46
47
47
public function testSessionGC ()
48
48
{
49
- $ storage = new PdoSessionStorage ($ this ->pdo , array ('db_table ' => 'sessions ' ), array ());
49
+ $ storage = new PdoSessionHandler ($ this ->pdo , array ('db_table ' => 'sessions ' ), array ());
50
50
51
51
$ storage ->write ('foo ' , 'bar ' );
52
52
$ storage ->write ('baz ' , 'bar ' );
0 commit comments