Esempio n. 1
0
 /**
  * @dataProvider nameDataProvider
  */
 public function testNameAccessor($value, $isValid)
 {
     if (false === $isValid) {
         $this->setExpectedException('Qu\\Exception\\InvalidArgumentException');
         $this->instance->setName($value);
     } else {
         $this->assertSame($this->instance, $this->instance->setName($value));
         $this->assertEquals(trim($value), $this->instance->getName());
     }
 }
Esempio n. 2
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'));
 }