public function __construct($filePattern = 'output/fail-lover.csv')
 {
     $fileGenerator = new FileNameGenerator($filePattern);
     $fileName = $fileGenerator->getGeneratedFileName();
     $this->loggerListener = new LoggerListener(new CsvRecorder($fileName));
     $this->replayListener = new ReplayListener(new CsvReader($fileName));
 }
Exemplo n.º 2
0
 /**
  * @return string
  */
 public function getGeneratedFileName()
 {
     return $this->replaceWithCallBack($this->getPattern(), 'datetime', function ($matches) {
         return FileNameGenerator::addRightSlash($matches[1]) . date('Y-m-d-His');
     });
 }