コード例 #1
0
 public function setUp()
 {
     $req = new CreateQueue($this->queue);
     $req->setVisibilityTimeout(5);
     $req->send();
     parent::setUp();
 }
コード例 #2
0
 /**
  * test create queue
  *
  * @group testQueue
  */
 public function testQueue()
 {
     $req = new CreateQueue($this->temp = 'test-queue');
     $res = $req->send();
     $this->assertTrue($res->isSuccess());
     $req = new SetQueueAttributes($this->temp);
     $req->setMaximumMessageSize(1990);
     $res = $req->send();
     $this->assertTrue($res->isSuccess());
     $req = new GetQueueAttributes($this->temp);
     /**
      * @var $res GetQueueAttributesRes
      */
     $res = $req->send();
     $this->assertEquals(1990, $res->getMaximumMessageSize());
     $req = new ListQueue();
     $req->setPrefix($this->temp);
     $req->setWithMeta(true);
     /**
      * @var $res ListQueueRes
      */
     $res = $req->send();
     $this->assertTrue($res->hasQueue($this->temp));
 }