예제 #1
0
 public function testScheduleMessageRepeatingIntervalUnsupported()
 {
     $mockAdapter = $this->getMock(Adapter\AdapterInterface::class);
     $mockAdapter->expects($this->any())->method('getAvailableSendParams')->will($this->returnValue([SendParameters::SCHEDULE]));
     $mockAdapter->expects($this->any())->method('sendMessage');
     /* @var $mockAdapter Adapter\AdapterInterface */
     $q = new Queue('test', $mockAdapter);
     $this->assertTrue($q->isSendParamSupported(SendParameters::SCHEDULE));
     $this->assertFalse($q->isSendParamSupported(SendParameters::REPEATING_INTERVAL));
     $this->setExpectedException(InvalidArgumentException::class);
     $q->schedule(new Message(), 1, 1);
 }