From 49dfa35e520988f2c5417943b8f85172baf0b6e6 Mon Sep 17 00:00:00 2001 From: michalsn Date: Sun, 5 Nov 2023 12:17:24 +0100 Subject: [PATCH] add test --- tests/DatabaseHandlerTest.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/DatabaseHandlerTest.php b/tests/DatabaseHandlerTest.php index cd1f1ec..26eb20a 100644 --- a/tests/DatabaseHandlerTest.php +++ b/tests/DatabaseHandlerTest.php @@ -45,7 +45,7 @@ public function testPriority() $this->assertSame('high', self::getPrivateProperty($handler, 'priority')); } - public function testPriorityException() + public function testPriorityNameException() { $this->expectException(QueueException::class); $this->expectExceptionMessage('The priority name should consists only lowercase letters.'); @@ -54,6 +54,15 @@ public function testPriorityException() $handler->setPriority('high_:'); } + public function testPriorityNameLengthException() + { + $this->expectException(QueueException::class); + $this->expectExceptionMessage('The priority name is too long. It should be no longer than 64 letters.'); + + $handler = new DatabaseHandler($this->config); + $handler->setPriority(str_repeat('a', 65)); + } + /** * @throws ReflectionException */