Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     $this->registry = $this->getMockBuilder(JobTypeRegistry::class)->disableOriginalConstructor()->getMock();
     $this->jobManager = $this->createMock(JobManagerInterface::class);
     $this->invoker = $this->getMockBuilder(Invoker::class)->disableOriginalConstructor()->getMock();
     $this->loggerFactory = $this->createMock(LoggerFactoryInterface::class);
     $this->logManager = $this->createMock(LogManagerInterface::class);
     $this->dispatcher = $this->createMock(EventDispatcherInterface::class);
     $this->helper = $this->getMockBuilder(JobHelper::class)->disableOriginalConstructor()->getMock();
     $this->locker = $this->createMock(LockManagerInterface::class);
     $this->validator = $this->createMock(ValidatorInterface::class);
     $this->logger = $this->createMock(LoggerInterface::class);
     $this->producer = $this->createMock(ProducerInterface::class);
     $this->jobManager->method('getClass')->willReturn('Abc\\Bundle\\JobBundle\\Model\\Job');
     $this->subject = new Manager($this->registry, $this->jobManager, $this->invoker, $this->loggerFactory, $this->logManager, $this->dispatcher, $this->helper, $this->locker, $this->validator, $this->logger);
     $this->subject->setProducer($this->producer);
 }