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
|
|
|
|