Ejemplo n.º 1
0
 /**
  * @param ProcessorChain  $processorChain
  * @param ProviderChain   $providerChain
  * @param string          $locale
  * @param int             $seed
  * @param bool            $persistOnce
  * @param LoggerInterface $logger
  */
 public function __construct(ProcessorChain $processorChain, ProviderChain $providerChain, $locale, $seed, $persistOnce, LoggerInterface $logger = null)
 {
     $this->processors = $processorChain->getProcessors();
     $options = [];
     $options['providers'] = $providerChain->getProviders();
     $options['locale'] = $locale;
     $options['seed'] = $seed;
     $options['persist_once'] = $persistOnce;
     if (null !== $logger) {
         $options['logger'] = $logger;
     }
     $this->options = $options;
 }
 /**
  * @coversNothing
  */
 public function testGenerator()
 {
     $this->assertSame(1, count($this->processorChain->getProcessors()));
     $this->assertSame('Hautelook\\AliceBundle\\Tests\\SymfonyApp\\TestBundle\\DataFixtures\\Processor\\BrandProcessor', get_class($this->processorChain->getProcessors()[0]), 'Expected custom Faker provider to be registered.');
 }