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

Was this example useful?
0
                                                    public function testGetUnknownMessagePriorityName(): void
    {
        $this->expectExceptionObject(
            new \InvalidArgumentException(
                'Unknown priority test, expected one of Very Low, Low, Normal, High, Very High'
            )
        );

        MessagePriority::getMessagePriorityName('test');
    }
                                            
Was this example useful?
0
                                                    public function testGetUnknownMessagePriority(): void
    {
        $this->expectExceptionObject(
            new \InvalidArgumentException(
                'Given priority could not be converted to transport\'s one. Got: test'
            )
        );

        MessagePriority::getMessagePriority('test');
    }
                                            
Was this example useful?
0
                                                    private function getDefaultPriority(string $topicName): string
    {
        $priority = $this->topicRegistry->get($topicName)->getDefaultPriority(Config::DEFAULT_QUEUE_NAME);

        return MessagePriority::getMessagePriorityName($priority);
    }
                                            
MessagePriority's Other Methods