Passed
Push — master ( d467ff...321125 )
by Petr
08:04
created

NodeFailTest   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 70
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 22
c 1
b 0
f 0
dl 0
loc 70
rs 10
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A testExists() 0 5 1
A testDir() 0 5 1
A testFile() 0 5 1
A testWritable() 0 5 1
A testReadable() 0 5 1
A testCreated() 0 5 1
A testSize() 0 5 1
1
<?php
2
3
namespace StorageDirsTests;
4
5
6
use kalanis\kw_files\FilesException;
7
8
9
class NodeFailTest extends AStorageTest
10
{
11
    /**
12
     * @throws FilesException
13
     */
14
    public function testExists(): void
15
    {
16
        $lib = $this->getNodeFailLib();
17
        $this->expectException(FilesException::class);
18
        $lib->exists(['unknown']);
19
    }
20
21
    /**
22
     * @throws FilesException
23
     */
24
    public function testDir(): void
25
    {
26
        $lib = $this->getNodeFailLib();
27
        $this->expectException(FilesException::class);
28
        $lib->isDir(['unknown']);
29
    }
30
31
    /**
32
     * @throws FilesException
33
     */
34
    public function testFile(): void
35
    {
36
        $lib = $this->getNodeFailLib();
37
        $this->expectException(FilesException::class);
38
        $lib->isFile(['unknown']);
39
    }
40
41
    /**
42
     * @throws FilesException
43
     */
44
    public function testReadable(): void
45
    {
46
        $lib = $this->getNodeFailLib();
47
        $this->expectException(FilesException::class);
48
        $lib->isReadable(['unknown']);
49
    }
50
51
    /**
52
     * @throws FilesException
53
     */
54
    public function testWritable(): void
55
    {
56
        $lib = $this->getNodeFailLib();
57
        $this->expectException(FilesException::class);
58
        $lib->isWritable(['unknown']);
59
    }
60
61
    /**
62
     * @throws FilesException
63
     */
64
    public function testSize(): void
65
    {
66
        $lib = $this->getNodeFailLib();
67
        $this->expectException(FilesException::class);
68
        $lib->size(['unknown']);
69
    }
70
71
    /**
72
     * @throws FilesException
73
     */
74
    public function testCreated(): void
75
    {
76
        $lib = $this->getNodeFailLib();
77
        $this->expectException(FilesException::class);
78
        $lib->created(['unknown']);
79
    }
80
}
81