public function testCreate()
 {
     $this->assertFalse($this->provider->queueExists());
     $this->assertTrue($this->provider->queueExists());
     $this->assertTrue($this->provider->create());
     $this->assertTrue($this->provider->queueExists());
     $provider = $this->getIronMqProvider(['subscribers' => [['protocol' => 'email', 'endpoint' => '*****@*****.**']]]);
     $this->setExpectedException('InvalidArgumentException');
     $provider->create();
 }
 public function testCreate()
 {
     $this->assertFalse($this->provider->queueExists());
     $stub = $this->provider->getCache();
     $stub->expects($this->once())->method('contains')->will($this->returnValue(true));
     $this->assertTrue($this->provider->queueExists());
     $this->assertTrue($this->provider->create());
     $this->assertTrue($this->provider->queueExists());
     $provider = $this->getIronMqProvider(['subscribers' => [['protocol' => 'email', 'endpoint' => '*****@*****.**']]]);
     $this->setExpectedException('InvalidArgumentException');
     $provider->create();
 }
Example #3
0
 /**
  * @covers Uecode\Bundle\QPushBundle\Provider\AwsProvider::createQueue
  * @covers Uecode\Bundle\QPushBundle\Provider\AwsProvider::queueExists
  */
 public function testCreateQueue()
 {
     $provider = $this->getAwsProvider(['push_notifications' => false]);
     $stub = $provider->getCache();
     $stub->expects($this->once())->method('contains')->will($this->returnValue(true));
     $this->assertTrue($provider->queueExists());
     $provider->createQueue();
     $this->assertTrue($provider->queueExists());
     $this->provider->createQueue();
     $this->assertTrue($this->provider->queueExists());
 }