Пример #1
0
 /**
  * Test produce method
  *
  * @param string $url
  * @param string $topic
  * @param string $producerId
  * @param string $body
  * @param string $accessKey
  * @param string $accessSecret
  * @dataProvider getMessageQueueInfo
  */
 public function testProduce($url, $topic, $producerId, $body, $accessKey, $accessSecret)
 {
     $authorization = new Authorization($accessKey, $accessSecret);
     $producer = new Producer($url, $authorization);
     $message = new Message();
     $message->setBody($body);
     $response = $producer->produce($topic, $producerId, $message);
     $this->assertTrue($response->isSuccessful());
 }