| Total Complexity | 6 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class ContextTest extends TestCase |
||
| 8 | { |
||
| 9 | protected $file; |
||
| 10 | |||
| 11 | public function setup() |
||
| 12 | { |
||
| 13 | $this->file = __DIR__.'/../tmp/context.txt'; |
||
| 14 | $handle = fopen($this->file, 'w+'); |
||
| 15 | foreach (range(1, 40) as $line) { |
||
| 16 | fwrite($handle, 'Line '.$line."\n"); |
||
|
|
|||
| 17 | } |
||
| 18 | $stat = fstat($handle); |
||
| 19 | ftruncate($handle, $stat['size'] - 1); |
||
| 20 | fclose($handle); |
||
| 21 | } |
||
| 22 | |||
| 23 | public function tearDown() |
||
| 24 | { |
||
| 25 | unlink($this->file); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function testContextTop() |
||
| 32 | } |
||
| 33 | |||
| 34 | public function testContextMiddle() |
||
| 38 | } |
||
| 39 | |||
| 40 | public function testContextBottom() |
||
| 44 | } |
||
| 45 | } |
||
| 46 |