Skip to content

Commit 5a8b00a

Browse files
committed
add delay exception test
1 parent 376ce2a commit 5a8b00a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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)