Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsn committed Nov 5, 2023
1 parent 4c5c464 commit 49dfa35
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/DatabaseHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand All @@ -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
*/
Expand Down

0 comments on commit 49dfa35

Please sign in to comment.