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::__construct |
||
48 | * @covers \LazyEight\DiTesto\TextFile::readLines |
||
49 | * @uses \LazyEight\DiTesto\TextFile |
||
50 | * @return \LazyEight\DiTesto\TextFile |
||
51 | */ |
||
52 | public function testCanBeCreatedWithContent() |
||
60 | |||
61 | /** |
||
62 | * @covers \LazyEight\DiTesto\TextFile::getRawContent |
||
63 | * @uses \LazyEight\DiTesto\File |
||
64 | * @depends testCanBeCreatedWithContent |
||
65 | * @param TextFile $file |
||
66 | */ |
||
67 | public function testGetRawContent(TextFile $file) |
||
72 | |||
73 | /** |
||
74 | * @covers \LazyEight\DiTesto\TextFile::getRawContent |
||
75 | * @uses \LazyEight\DiTesto\File |
||
76 | * @depends testCanBeCreatedWithContent |
||
77 | * @param TextFile $file |
||
78 | */ |
||
79 | public function testCantGetRawContent(TextFile $file) |
||
83 | |||
84 | /** |
||
85 | * @covers \LazyEight\DiTesto\TextFile::setRawContent |
||
86 | * @covers \LazyEight\DiTesto\TextFile::readLines |
||
87 | * @uses \LazyEight\DiTesto\TextFile |
||
88 | * @depends testCanBeCreated |
||
89 | */ |
||
90 | public function testSetRawContent(TextFile $textFile) |
||
95 | |||
96 | /** |
||
97 | * @covers \LazyEight\DiTesto\TextFile::setRawContent |
||
98 | * @covers \LazyEight\DiTesto\TextFile::readLines |
||
99 | * @uses \LazyEight\DiTesto\TextFile |
||
100 | * @depends testCanBeCreated |
||
101 | */ |
||
102 | public function testSetEmptyRawContent(TextFile $textFile) |
||
107 | |||
108 | /** |
||
109 | * @covers \LazyEight\DiTesto\TextFile::getIterator |
||
110 | * @uses \LazyEight\DiTesto\TextFile |
||
111 | * @depends testCanBeCreatedWithContent |
||
112 | */ |
||
113 | public function testGetIterator(TextFile $textFile) |
||
117 | |||
118 | /** |
||
119 | * @covers \LazyEight\DiTesto\TextFile::offsetExists |
||
120 | * @uses \LazyEight\DiTesto\TextFile |
||
121 | * @depends testCanBeCreatedWithContent |
||
122 | */ |
||
123 | public function testOffsetExists(TextFile $textFile) |
||
127 | |||
128 | /** |
||
129 | * @covers \LazyEight\DiTesto\TextFile::offsetExists |
||
130 | * @uses \LazyEight\DiTesto\TextFile |
||
131 | * @depends testCanBeCreatedWithContent |
||
132 | */ |
||
133 | public function testOffsetNotExists(TextFile $textFile) |
||
137 | |||
138 | /** |
||
139 | * @covers \LazyEight\DiTesto\TextFile::count |
||
140 | * @uses \LazyEight\DiTesto\TextFile |
||
141 | * @depends testCanBeCreatedWithContent |
||
142 | */ |
||
143 | public function testCount(TextFile $textFile) |
||
148 | |||
149 | /** |
||
150 | * @covers \LazyEight\DiTesto\TextFile::offsetGet |
||
151 | * @uses \LazyEight\DiTesto\TextFile |
||
152 | * @depends testCanBeCreatedWithContent |
||
153 | */ |
||
154 | public function testOffsetGet(TextFile $textFile) |
||
159 | |||
160 | /** |
||
161 | * @covers \LazyEight\DiTesto\TextFile::offsetSet |
||
162 | * @uses \LazyEight\DiTesto\TextFile |
||
163 | * @depends testCanBeCreatedWithContent |
||
164 | */ |
||
165 | public function testOffsetSet(TextFile $textFile) |
||
171 | |||
172 | /** |
||
173 | * @covers \LazyEight\DiTesto\TextFile::offsetUnset |
||
174 | * @uses \LazyEight\DiTesto\TextFile |
||
175 | * @depends testCanBeCreatedWithContent |
||
176 | */ |
||
177 | public function testOffsetUnset(TextFile $textFile) |
||
182 | |||
183 | /** |
||
184 | * @inheritDoc |
||
185 | */ |
||
186 | protected function tearDown() |
||
196 | } |
||
197 |