function it_removes_workers_from_redis_on_deregister(WorkerRegistryAdapterInterface $adapter, EventDispatcherInterface $eventDispatcher, WorkerInterface $worker)
 {
     $eventDispatcher->dispatch(ResqueWorkerEvents::UNREGISTERED, Argument::type('Resque\\Component\\Worker\\Event\\WorkerEvent'))->shouldBeCalled();
     $adapter->delete($worker)->shouldBeCalled(1);
     $this->deregister($worker)->shouldReturn($this);
 }
Exemple #2
0
 /**
  * {@inheritDoc}
  */
 public function deregister(WorkerInterface $worker)
 {
     $this->adapter->delete($worker);
     $this->eventDispatcher->dispatch(ResqueWorkerEvents::UNREGISTERED, new WorkerEvent($worker));
     return $this;
 }