Skip to content

Commit ff56cf4

Browse files
committed
add delay exception test
1 parent 7898752 commit ff56cf4

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/DatabaseHandlerTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,15 @@ public function testPushAndPopWithDelay(): void
212212
$this->assertSame($payload, $result->payload);
213213
}
214214

215+
public function testPushWithDelayException(): void
216+
{
217+
$this->expectException(QueueException::class);
218+
$this->expectExceptionMessage('The number of seconds of delay must be a positive integer.');
219+
220+
$handler = new DatabaseHandler($this->config);
221+
$handler->setDelay(-60);
222+
}
223+
215224
/**
216225
* @throws ReflectionException
217226
*/

0 commit comments

Comments
 (0)