예제 #1
0
 public function testUpdate()
 {
     $config = new SqsQueueConfig();
     $config->setName('name');
     $config->setAccountId('123456789012');
     $this->client->expects($this->once())->method('setQueueAttributes')->with(['QueueUrl' => '/123456789012/name', 'Attributes' => $config->toAttributes()]);
     $this->instance->update(new SqsQueue($this->client, $config));
     $this->setExpectedException('Qu\\Exception\\InvalidArgumentException');
     $this->instance->update($this->getMock('Qu\\Queue\\QueueAdapterInterface'));
 }
예제 #2
0
 public function testConstructorWithArrayConfig()
 {
     $config = ['delay_seconds' => 22];
     $instance = new SqsQueueConfig($config);
     $this->assertSame(22, $instance->getDelaySeconds());
 }