1 | <?php |
||
8 | class FileSystemHandlerTest extends TestCase |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $path = './tests/files'; |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $files = ['urls.txt', 'images.jpg', 'urls_not_readable.txt']; |
||
19 | |||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $sizes = [121, 8402, 121]; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $types = ['text/plain', 'image/jpeg', 'text/plain']; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $file = './tests/files/urls.txt'; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $imageFile = './tests/files/images.jpg'; |
||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $notReadable = './tests/files/urls_not_readable.txt'; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $notExistsFile = './tests/files/newFilename.txt'; |
||
49 | |||
50 | /** |
||
51 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::exists |
||
52 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
53 | */ |
||
54 | public function testExists() |
||
58 | |||
59 | /** |
||
60 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::exists |
||
61 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
62 | */ |
||
63 | public function testNotExists() |
||
67 | |||
68 | /** |
||
69 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::isReadable |
||
70 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
71 | */ |
||
72 | public function testReadable() |
||
76 | |||
77 | /** |
||
78 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::isReadable |
||
79 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
80 | */ |
||
81 | public function testNotReadable() |
||
85 | |||
86 | /** |
||
87 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::isWritable |
||
88 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
89 | */ |
||
90 | public function testWritable() |
||
95 | |||
96 | /** |
||
97 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::isWritable |
||
98 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
99 | */ |
||
100 | public function testNotWritable() |
||
104 | |||
105 | /** |
||
106 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::getPathName |
||
107 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
108 | */ |
||
109 | public function testGetPathName() |
||
115 | |||
116 | /** |
||
117 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::getPathName |
||
118 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
119 | */ |
||
120 | public function testCantGetPathName() |
||
126 | |||
127 | /** |
||
128 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::getFilename |
||
129 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
130 | */ |
||
131 | public function testGetFileName() |
||
137 | |||
138 | /** |
||
139 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::getFilename |
||
140 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
141 | */ |
||
142 | public function testCantGetFileName() |
||
149 | |||
150 | /** |
||
151 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::getSize |
||
152 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
153 | */ |
||
154 | public function testGetSize() |
||
160 | |||
161 | /** |
||
162 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::getFilename |
||
163 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
164 | */ |
||
165 | public function testCantGetSize() |
||
170 | |||
171 | /** |
||
172 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::getType |
||
173 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
174 | */ |
||
175 | public function testGetType() |
||
180 | |||
181 | /** |
||
182 | * @covers \LazyEight\DiTesto\FileSystem\FileSystemHandler::getFilename |
||
183 | * @uses \LazyEight\DiTesto\FileSystem\FileSystemHandler |
||
184 | */ |
||
185 | public function testCantGetType() |
||
190 | } |
||
191 |