1 | <?php |
||
10 | class TextFileReaderTest 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 | * @covers \LazyEight\DiTesto\TextFileReader::__construct |
||
29 | * @uses \LazyEight\DiTesto\TextFileReader |
||
30 | * @return \LazyEight\DiTesto\TextFileReader |
||
31 | */ |
||
32 | public function testCanBeCreated() |
||
40 | |||
41 | /** |
||
42 | * @covers \LazyEight\DiTesto\TextFileReader::readFile |
||
43 | * @covers \LazyEight\DiTesto\TextFileReader::valid |
||
44 | * @covers \LazyEight\DiTesto\TextFileReader::validatePath |
||
45 | * @covers \LazyEight\DiTesto\TextFileReader::validateReadable |
||
46 | * @covers \LazyEight\DiTesto\TextFileReader::validateType |
||
47 | * @uses \LazyEight\DiTesto\TextFileReader |
||
48 | * @depends testCanBeCreated |
||
49 | * @uses \LazyEight\DiTesto\TextFileReader |
||
50 | * @param \LazyEight\DiTesto\TextFileLoader |
||
51 | */ |
||
52 | public function testCanBeLoaded(TextFileReader $loader) |
||
56 | |||
57 | /** |
||
58 | * @covers \LazyEight\DiTesto\TextFileReader::readFile |
||
59 | * @covers \LazyEight\DiTesto\TextFileReader::valid |
||
60 | * @covers \LazyEight\DiTesto\TextFileReader::validatePath |
||
61 | * @expectedException \LazyEight\DiTesto\Exceptions\IOException |
||
62 | * @uses \LazyEight\DiTesto\TextFileReader |
||
63 | */ |
||
64 | public function testCantBeLoaded() |
||
70 | |||
71 | /** |
||
72 | * @covers \LazyEight\DiTesto\TextFileReader::readFile |
||
73 | * @covers \LazyEight\DiTesto\TextFileReader::valid |
||
74 | * @covers \LazyEight\DiTesto\TextFileReader::validatePath |
||
75 | * @covers \LazyEight\DiTesto\TextFileReader::validateType |
||
76 | * @expectedException \LazyEight\DiTesto\Exceptions\IOException |
||
77 | */ |
||
78 | public function testInvalidType() |
||
84 | |||
85 | /** |
||
86 | * @covers \LazyEight\DiTesto\TextFileReader::readFile |
||
87 | * @covers \LazyEight\DiTesto\TextFileReader::valid |
||
88 | * @covers \LazyEight\DiTesto\TextFileReader::validatePath |
||
89 | * @covers \LazyEight\DiTesto\TextFileReader::validateReadable |
||
90 | * @expectedException \LazyEight\DiTesto\Exceptions\IOException |
||
91 | */ |
||
92 | public function testCantRead() |
||
100 | |||
101 | /** |
||
102 | * @covers \LazyEight\DiTesto\TextFileReader::readFile |
||
103 | * @covers \LazyEight\DiTesto\TextFileReader::getPath |
||
104 | * @uses \LazyEight\DiTesto\TextFileReader |
||
105 | */ |
||
106 | public function testCanGetPath() |
||
111 | } |
||
112 |