1 | <?php |
||
10 | class TextFileTest extends TestCase |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $file = './tests/files/urls.txt'; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $imageFile = './tests/files/images.jpg'; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $notReadable = './tests/files/urls_not_readable.txt'; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $newFilename = './tests/files/new_file.txt'; |
||
31 | |||
32 | |||
33 | /** |
||
34 | * @covers \LazyEight\DiTesto\TextFile::__construct |
||
35 | * @uses \LazyEight\DiTesto\TextFile |
||
36 | * @return \LazyEight\DiTesto\TextFile |
||
37 | */ |
||
38 | public function testCanBeCreated() |
||
45 | |||
46 | /** |
||
47 | * @covers \LazyEight\DiTesto\TextFile::exists |
||
48 | * @uses \LazyEight\DiTesto\TextFile |
||
49 | */ |
||
50 | public function testExists() |
||
54 | |||
55 | /** |
||
56 | * @covers \LazyEight\DiTesto\TextFile::exists |
||
57 | * @uses \LazyEight\DiTesto\TextFile |
||
58 | */ |
||
59 | public function testNotExists() |
||
63 | |||
64 | /** |
||
65 | * @covers \LazyEight\DiTesto\TextFile::isReadable |
||
66 | * @uses \LazyEight\DiTesto\TextFile |
||
67 | * @depends testCanBeCreated |
||
68 | */ |
||
69 | public function testIsReadable(TextFile $textFile) |
||
73 | |||
74 | /** |
||
75 | * @covers \LazyEight\DiTesto\TextFile::isReadable |
||
76 | * @uses \LazyEight\DiTesto\TextFile |
||
77 | */ |
||
78 | public function testNotReadable() |
||
83 | |||
84 | /** |
||
85 | * @covers \LazyEight\DiTesto\TextFile::isWritable |
||
86 | * @uses \LazyEight\DiTesto\TextFile |
||
87 | */ |
||
88 | public function testIsWritable() |
||
94 | |||
95 | /** |
||
96 | * @covers \LazyEight\DiTesto\TextFile::isWritable |
||
97 | * @uses \LazyEight\DiTesto\TextFile |
||
98 | */ |
||
99 | public function testNotWritable() |
||
105 | |||
106 | /** |
||
107 | * @covers \LazyEight\DiTesto\TextFile::getSize |
||
108 | * @uses \LazyEight\DiTesto\TextFile |
||
109 | * @depends testCanBeCreated |
||
110 | */ |
||
111 | public function testGetSize(TextFile $textFile) |
||
115 | |||
116 | /** |
||
117 | * @covers \LazyEight\DiTesto\TextFile::getSize |
||
118 | * @uses \LazyEight\DiTesto\TextFile |
||
119 | * @depends testCanBeCreated |
||
120 | */ |
||
121 | public function testGetSizeWrongSize(TextFile $textFile) |
||
125 | |||
126 | /** |
||
127 | * @covers \LazyEight\DiTesto\TextFile::getSize |
||
128 | * @uses \LazyEight\DiTesto\TextFile |
||
129 | */ |
||
130 | public function testGetSizeNotReadable() |
||
135 | |||
136 | /** |
||
137 | * @covers \LazyEight\DiTesto\TextFile::getType |
||
138 | * @uses \LazyEight\DiTesto\TextFile |
||
139 | * @depends testCanBeCreated |
||
140 | */ |
||
141 | public function testGetType(TextFile $textFile) |
||
145 | |||
146 | /** |
||
147 | * @covers \LazyEight\DiTesto\TextFile::getType |
||
148 | * @uses \LazyEight\DiTesto\TextFile |
||
149 | */ |
||
150 | public function testGetWrongType() |
||
155 | |||
156 | /** |
||
157 | * @covers \LazyEight\DiTesto\TextFile::getFilename |
||
158 | * @uses \LazyEight\DiTesto\TextFile |
||
159 | * @depends testCanBeCreated |
||
160 | */ |
||
161 | public function testGetFilename(TextFile $textFile) |
||
165 | |||
166 | /** |
||
167 | * @covers \LazyEight\DiTesto\TextFile::getFilename |
||
168 | * @uses \LazyEight\DiTesto\TextFile |
||
169 | * @depends testCanBeCreated |
||
170 | */ |
||
171 | public function testGetWrongFilename(TextFile $textFile) |
||
175 | |||
176 | /** |
||
177 | * @covers \LazyEight\DiTesto\TextFile::getPath |
||
178 | * @uses \LazyEight\DiTesto\TextFile |
||
179 | * @depends testCanBeCreated |
||
180 | */ |
||
181 | public function testGetPath(TextFile $textFile) |
||
185 | |||
186 | /** |
||
187 | * @covers \LazyEight\DiTesto\TextFile::getPath |
||
188 | * @uses \LazyEight\DiTesto\TextFile |
||
189 | * @depends testCanBeCreated |
||
190 | */ |
||
191 | public function testGetWrongPath(TextFile $textFile) |
||
195 | |||
196 | /** |
||
197 | * @covers \LazyEight\DiTesto\TextFile::getPathName |
||
198 | * @uses \LazyEight\DiTesto\TextFile |
||
199 | * @depends testCanBeCreated |
||
200 | */ |
||
201 | public function testGetPathname(TextFile $textFile) |
||
205 | |||
206 | /** |
||
207 | * @covers \LazyEight\DiTesto\TextFile::getPathName |
||
208 | * @uses \LazyEight\DiTesto\TextFile |
||
209 | * @depends testCanBeCreated |
||
210 | */ |
||
211 | public function testGetWrongPathname(TextFile $textFile) |
||
215 | |||
216 | /** |
||
217 | * @covers \LazyEight\DiTesto\TextFile::read |
||
218 | * @covers \LazyEight\DiTesto\TextFile::__toString |
||
219 | * @uses \LazyEight\DiTesto\TextFile |
||
220 | * @depends testCanBeCreated |
||
221 | * @return \LazyEight\DiTesto\TextFile |
||
222 | */ |
||
223 | public function testRead(TextFile $textFile) |
||
230 | |||
231 | /** |
||
232 | * @covers \LazyEight\DiTesto\TextFile::getIterator |
||
233 | * @uses \LazyEight\DiTesto\TextFile |
||
234 | * @depends testRead |
||
235 | */ |
||
236 | public function testGetIterator(TextFile $textFile) |
||
240 | |||
241 | /** |
||
242 | * @covers \LazyEight\DiTesto\TextFile::offsetExists |
||
243 | * @uses \LazyEight\DiTesto\TextFile |
||
244 | * @depends testRead |
||
245 | */ |
||
246 | public function testOffsetExists(TextFile $textFile) |
||
250 | |||
251 | /** |
||
252 | * @covers \LazyEight\DiTesto\TextFile::offsetExists |
||
253 | * @uses \LazyEight\DiTesto\TextFile |
||
254 | * @depends testRead |
||
255 | */ |
||
256 | public function testOffsetNotExists(TextFile $textFile) |
||
260 | |||
261 | /** |
||
262 | * @covers \LazyEight\DiTesto\TextFile::count |
||
263 | * @uses \LazyEight\DiTesto\TextFile |
||
264 | * @depends testRead |
||
265 | */ |
||
266 | public function testCount(TextFile $textFile) |
||
271 | |||
272 | /** |
||
273 | * @covers \LazyEight\DiTesto\TextFile::offsetGet |
||
274 | * @uses \LazyEight\DiTesto\TextFile |
||
275 | * @depends testRead |
||
276 | */ |
||
277 | public function testOffsetGet(TextFile $textFile) |
||
282 | |||
283 | /** |
||
284 | * @covers \LazyEight\DiTesto\TextFile::offsetSet |
||
285 | * @uses \LazyEight\DiTesto\TextFile |
||
286 | * @depends testRead |
||
287 | */ |
||
288 | public function testOffsetSet(TextFile $textFile) |
||
294 | |||
295 | /** |
||
296 | * @covers \LazyEight\DiTesto\TextFile::write |
||
297 | * @uses \LazyEight\DiTesto\TextFile |
||
298 | * @depends testRead |
||
299 | */ |
||
300 | public function testWrite(TextFile $textFile) |
||
308 | |||
309 | /** |
||
310 | * @covers \LazyEight\DiTesto\TextFile::offsetUnset |
||
311 | * @uses \LazyEight\DiTesto\TextFile |
||
312 | * @depends testRead |
||
313 | */ |
||
314 | public function testOffsetUnset(TextFile $textFile) |
||
319 | |||
320 | /** |
||
321 | * @inheritDoc |
||
322 | */ |
||
323 | public static function tearDownAfterClass() |
||
329 | |||
330 | /** |
||
331 | * @inheritDoc |
||
332 | */ |
||
333 | protected function tearDown() |
||
339 | } |
||
340 |