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

NullHandlerTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testNullHandler() 0 10 1
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