Beispiel #1
0
 public function main(array $keys)
 {
     foreach ($this->input as $line_str) {
         $line_str = trim($line_str);
         try {
             $line = new Line($line_str);
         } catch (InvalidLineException $e) {
             $this->outputter->output($line_str);
             continue;
         }
         $this->outputter->output($line->toPlainText($keys));
     }
 }
Beispiel #2
0
 /**
  * @test
  * @dataProvider getKeyTestData
  */
 public function toPlainTextFiltersJsonArray($keys, $expect)
 {
     $SUT = new Line($this->sampleNormalLine());
     $this->assertEquals("2014-03-18 17:25:38" . Line::TEXT_SEPARATOR . implode(Line::TEXT_SEPARATOR, $expect), $SUT->toPlainText($keys));
 }