public function setUp()
 {
     parent::setUp();
     $this->action = new SmartCodeAction($this->entityManager);
     $this->generator = new SmartCodeGenerator($this->entityManager);
     $this->subject = $this->getMock('Intracto\\SmartCodeBundle\\Entity\\SubjectInterface');
     $payload = $this->getMock('Intracto\\SmartCodeBundle\\Entity\\PayloadInterface');
     $options = new SmartCodeOptions();
     $options->setAmount(1);
     $codes = $this->generator->generate($payload, $options);
     $this->code = $codes[0];
 }
 public function setUp()
 {
     parent::setUp();
     $this->generator = new SmartCodeGenerator($this->entityManager);
 }