1<?php
2
3
4namespace dokuwiki\plugin\struct\test\mock;
5
6
7class CSVPageImporter extends \dokuwiki\plugin\struct\meta\CSVPageImporter
8{
9
10    /** @var \Generator */
11    protected $testData;
12
13    public function setTestData(array $testData)
14    {
15        $this->testData = $this->testDataGenerator($testData);
16
17    }
18
19    protected function openFile($file)
20    {
21    }
22
23    protected function getLine()
24    {
25        $current = $this->testData->current();
26        $this->testData->next();
27        return $current;
28    }
29
30    protected function testDataGenerator($testData)
31    {
32        foreach ($testData as $line) {
33            yield $line;
34        }
35
36        yield false;
37    }
38}
39