@@ 116-124 (lines=9) @@ | ||
113 | } |
|
114 | ||
115 | ||
116 | public function testSize() |
|
117 | { |
|
118 | $this->mock->expects( $this->once() )->method( 'size' ) |
|
119 | ->will( $this->returnValue( 4 ) ); |
|
120 | ||
121 | $result = $this->object->size( 'test' ); |
|
122 | ||
123 | $this->assertEquals( 4, $result ); |
|
124 | } |
|
125 | ||
126 | ||
127 | public function testSizeException() |
|
@@ 137-145 (lines=9) @@ | ||
134 | } |
|
135 | ||
136 | ||
137 | public function testTime() |
|
138 | { |
|
139 | $this->mock->expects( $this->once() )->method( 'lastModified' ) |
|
140 | ->will( $this->returnValue( 1 ) ); |
|
141 | ||
142 | $result = $this->object->time( 'test' ); |
|
143 | ||
144 | $this->assertGreaterThan( 0, $result ); |
|
145 | } |
|
146 | ||
147 | ||
148 | public function testTimeException() |
|
@@ 176-184 (lines=9) @@ | ||
173 | } |
|
174 | ||
175 | ||
176 | public function testHas() |
|
177 | { |
|
178 | $this->mock->expects( $this->once() )->method( 'exists' ) |
|
179 | ->will( $this->returnValue( true ) ); |
|
180 | ||
181 | $result = $this->object->has( 'test' ); |
|
182 | ||
183 | $this->assertTrue( $result ); |
|
184 | } |
|
185 | ||
186 | ||
187 | public function testHasFalse() |
|
@@ 187-195 (lines=9) @@ | ||
184 | } |
|
185 | ||
186 | ||
187 | public function testHasFalse() |
|
188 | { |
|
189 | $this->mock->expects( $this->once() )->method( 'exists' ) |
|
190 | ->will( $this->returnValue( false ) ); |
|
191 | ||
192 | $result = $this->object->has( 'test' ); |
|
193 | ||
194 | $this->assertFalse( $result ); |
|
195 | } |
|
196 | ||
197 | ||
198 | public function testRead() |
|
@@ 198-206 (lines=9) @@ | ||
195 | } |
|
196 | ||
197 | ||
198 | public function testRead() |
|
199 | { |
|
200 | $this->mock->expects( $this->once() )->method( 'get' ) |
|
201 | ->will( $this->returnValue( 'test' ) ); |
|
202 | ||
203 | $result = $this->object->read( 'file' ); |
|
204 | ||
205 | $this->assertEquals( 'test', $result ); |
|
206 | } |
|
207 | ||
208 | ||
209 | public function testReadException() |
|
@@ 219-228 (lines=10) @@ | ||
216 | } |
|
217 | ||
218 | ||
219 | public function testReadf() |
|
220 | { |
|
221 | $this->mock->expects( $this->once() )->method( 'get' ) |
|
222 | ->will( $this->returnValue( 'test' ) ); |
|
223 | ||
224 | $result = $this->object->readf( 'file' ); |
|
225 | ||
226 | $this->assertEquals( 'test', file_get_contents( $result ) ); |
|
227 | unlink( $result ); |
|
228 | } |
|
229 | ||
230 | ||
231 | public function testReads() |