Ejemplo n.º 1
0
 /**
  * @return null
  */
 public function setUp()
 {
     $depend = new Dependency();
     $depend->load();
     $profile = new AmqpProfile(array('queue' => 'af-test-queue'));
     $this->task = new PublisherTask($profile);
     $this->connData = array('host' => 'localhost', 'user' => 'guest', 'password' => 'guest', 'vhost' => '/');
     $params = array($this->connData, $this->task);
     $this->handler = new PublishHandler($this->connData, $this->task);
 }
Ejemplo n.º 2
0
 /**
  * @return null
  */
 public function setUp()
 {
     $depend = new Dependency();
     $depend->load();
     $profile = new AmqpProfile(array('queue' => 'af-test-queue'));
     $this->task = new ConsumerTask($profile);
     $this->connData = array('host' => 'localhost', 'user' => 'guest', 'password' => 'guest', 'vhost' => '/');
     $this->handlerClass = 'Appfuel\\MsgBroker\\Amqp\\AbstractHandler';
     $params = array($this->connData, $this->task);
     $this->handler = $this->getMockBuilder($this->handlerClass)->setConstructorArgs($params)->getMockForAbstractClass();
 }
Ejemplo n.º 3
0
 /**
  * @return null
  */
 public function setUp()
 {
     $depend = new Dependency();
     $depend->load();
     $this->exchangeName = 'my-exchange';
     $this->adapterData = array('message' => '', 'exchange' => $this->exchangeName, 'route-key' => '', 'mandatory' => false, 'immediate' => false, 'ticket' => null);
     $pInterface = 'Appfuel\\Framework\\MsgBroker\\Amqp\\AmqpProfileInterface';
     $this->profile = $this->getMockBuilder($pInterface)->disableOriginalConstructor()->setMethods(array('getExchangeName', 'getQueueName', 'getExchangeData', 'getQueueData', 'getBindData'))->getMock();
     $this->profile->expects($this->any())->method('getExchangeName')->will($this->returnValue($this->exchangeName));
     $this->task = new PublisherTask($this->profile);
 }