testData = $this->testDataGenerator($testData); } protected function openFile($file) { } protected function getLine() { $current = $this->testData->current(); $this->testData->next(); return $current; } protected function testDataGenerator($testData) { foreach ($testData as $line) { yield $line; } yield false; } }