Passed
Push — master ( 95ec1e...702df7 )
by Petr
02:32
created

DirFlatFailTest::testCreate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace StorageDirsTests;
4
5
6
use kalanis\kw_files\FilesException;
7
use kalanis\kw_paths\PathsException;
8
9
10
class DirFlatFailTest extends AStorageTest
11
{
12
    /**
13
     * @throws FilesException
14
     * @throws PathsException
15
     */
16
    public function testCreate(): void
17
    {
18
        $lib = $this->getDirFlatFailLib();
19
        $this->expectException(FilesException::class);
20
        $lib->createDir(['another'], false);
21
    }
22
23
    /**
24
     * @throws FilesException
25
     * @throws PathsException
26
     */
27
    public function testRead(): void
28
    {
29
        $lib = $this->getDirFlatFailLib();
30
        $this->expectException(FilesException::class);
31
        $lib->readDir([''], false, true);
32
    }
33
34
    /**
35
     * @throws FilesException
36
     * @throws PathsException
37
     */
38
    public function testCopy(): void
39
    {
40
        $lib = $this->getDirFlatFailLib();
41
        $this->expectException(FilesException::class);
42
        $lib->copyDir(['next_one'], ['more']);
43
    }
44
45
    /**
46
     * @throws FilesException
47
     * @throws PathsException
48
     */
49
    public function testMove(): void
50
    {
51
        $lib = $this->getDirFlatFailLib();
52
        $this->expectException(FilesException::class);
53
        $lib->moveDir(['more'], ['another']);
54
    }
55
56
    /**
57
     * @throws FilesException
58
     * @throws PathsException
59
     */
60
    public function testDelete(): void
61
    {
62
        $lib = $this->getDirFlatFailLib();
63
        $this->expectException(FilesException::class);
64
        $lib->deleteDir(['another'], true);
65
    }
66
}
67