Programming Language PHP
Namespace Oro\Component\MessageQueue\Client
Class MessagePriority
Total Examples 3
3 code examples of PHP Oro\Component\MessageQueue\Client\MessagePriority extracted from open source projects
public function testGetUnknownMessagePriorityName(): void
{
$this->expectExceptionObject(
new \InvalidArgumentException(
'Unknown priority test, expected one of Very Low, Low, Normal, High, Very High'
)
);
MessagePriority::getMessagePriorityName('test');
}
public function testGetUnknownMessagePriority(): void
{
$this->expectExceptionObject(
new \InvalidArgumentException(
'Given priority could not be converted to transport\'s one. Got: test'
)
);
MessagePriority::getMessagePriority('test');
}
private function getDefaultPriority(string $topicName): string
{
$priority = $this->topicRegistry->get($topicName)->getDefaultPriority(Config::DEFAULT_QUEUE_NAME);
return MessagePriority::getMessagePriorityName($priority);
}