protected function dumpRowsToAllFiles(Config $config, array $dumpers)
 {
     // generate random data and write row by row
     $this->stopwatch->start('generating_rows', 'generate_dumps');
     $this->progress->start($this->output, $config->getFakeNumber());
     $unit = floor($config->getFakeNumber() / 100);
     $this->progress->setRedrawFrequency($unit < 1 ? 1 : $unit);
     $this->progress->setBarCharacter('<comment>=</comment>');
     $this->output->writeln('Generating <info>' . $config->getFakeNumber() . '</info> rows ...');
     parent::dumpRowsToAllFiles($config, $dumpers);
     $this->progress->finish();
     $this->output->writeln('Finalizing files ...');
     $this->stopwatch->stop('generating_rows');
     $this->stopwatch->start('finalizing_files', 'generate_dumps');
 }
Example #2
0
 /**
  * @covers CSanquer\FakeryGenerator\Model\Config::getFakeNumber
  * @covers CSanquer\FakeryGenerator\Model\Config::setFakeNumber
  */
 public function testGetSetFakeNumber()
 {
     $this->assertInstanceOf('\\CSanquer\\FakeryGenerator\\Model\\Config', $this->config->setFakeNumber('100'));
     $this->assertSame(100, $this->config->getFakeNumber());
 }
 protected function dumpRowsToAllFiles(Config $config, array $dumpers)
 {
     // generate random data and write row by row
     $faker = $config->createFaker();
     for ($index = 1; $index <= $config->getFakeNumber(); $index++) {
         $this->generateAndDumpRows($faker, $config, $dumpers);
     }
 }