Passed
Push — master ( 1a6375...8f4058 )
by Petr
08:21 queued 05:12
created

StorageTest::testNone()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace tests\ChecksTests\TraitsTests;
4
5
6
use tests\CommonTestClass;
7
use kalanis\kw_mime\MimeException;
8
use kalanis\kw_storage\Storage;
9
use kalanis\kw_storage\StorageException;
10
11
12
class StorageTest extends CommonTestClass
13
{
14
    /**
15
     * @throws MimeException
16
     * @throws StorageException
17
     */
18
    public function testOwn(): void
19
    {
20
        $store = new Storage(new Storage\Factory(new Storage\Key\Factory(), new Storage\Target\Factory()));
21
        $store->init('none');
22
        $lib = new XStorage();
23
        $lib->setStorage($store);
24
        $this->assertInstanceOf(Storage::class, $lib->getStorage());
25
    }
26
27
    /**
28
     * @throws MimeException
29
     */
30
    public function testNone(): void
31
    {
32
        $lib = new XStorage();
33
        $this->expectException(MimeException::class);
34
        $lib->getStorage();
35
    }
36
}
37