blob: bfd2e883c628860935ca8973631cae018a1ef8b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<?php
namespace Engelsystem\Test\Unit\Http\SessionHandlers;
use Engelsystem\Test\Unit\Http\SessionHandlers\Stub\ArrayHandler;
use PHPUnit\Framework\TestCase;
class AbstractHandlerTest extends TestCase
{
/**
* @covers \Engelsystem\Http\SessionHandlers\AbstractHandler::open
*/
public function testOpen()
{
$handler = new ArrayHandler();
$return = $handler->open('/foo/bar', '1337asd098hkl7654');
$this->assertTrue($return);
$this->assertEquals('1337asd098hkl7654', $handler->getName());
$this->assertEquals('/foo/bar', $handler->getSessionPath());
}
/**
* @covers \Engelsystem\Http\SessionHandlers\AbstractHandler::close
*/
public function testClose()
{
$handler = new ArrayHandler();
$return = $handler->close();
$this->assertTrue($return);
}
/**
* @covers \Engelsystem\Http\SessionHandlers\AbstractHandler::gc
*/
public function testGc()
{
$handler = new ArrayHandler();
$return = $handler->gc(60 * 60 * 24);
$this->assertTrue($return);
}
}
|