Passed
Push — master ( 3c979b...72c793 )
by Kirill
03:02
created

NullHandlerTest::testNullHandler()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 10
rs 10
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Tests\Session;
13
14
use PHPUnit\Framework\TestCase;
15
use Spiral\Session\Handler\NullHandler;
16
17
class NullHandlerTest extends TestCase
18
{
19
    public function testNullHandler(): void
20
    {
21
        $handler = new NullHandler();
22
23
        $this->assertTrue($handler->destroy('abc'));
24
        $this->assertTrue($handler->gc(1));
25
        $this->assertTrue($handler->open('path', 1));
26
        $this->assertSame('', $handler->read(''));
27
        $this->assertTrue($handler->write('abc', 'data'));
28
        $this->assertTrue($handler->close());
29
    }
30
}
31