public function update(\SplSubject $subject) { $queue = Queue::declareQueue($this->queueName); $producer = new \MicroQueue\Producer($queue); $message = $subject->getData(); $producer->publish($message); }
/** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Queue name must a name (string) not an id (numeric sequence) */ public function testCreateQueueShouldThrowAnExceptionWhenQueueNameIsNotAString() { $queueName = 123; Queue::declareQueue($queueName); }
protected function setUp() { $this->queue = Queue::declareQueue('nls'); $this->producer = new Producer($this->queue); }
protected function setUp() { $this->queue = Queue::declareQueue('nls'); $producer = new Producer($this->queue); $producer->publish('This is a test'); }