use PHPUnit\Framework\TestCase;
use Symfony\Component\Messenger\Bridge\Amqp\Transport\AmqpStamp;
/**
* @requires extension amqp
*/
class AmqpStampTest extends TestCase
{ public function testRoutingKeyOnly() { $stamp =
new AmqpStamp('routing_key'
);
$this->
assertSame('routing_key',
$stamp->
getRoutingKey());
$this->
assertSame(\AMQP_NOPARAM,
$stamp->
getFlags());
$this->
assertSame([],
$stamp->
getAttributes());
} public function testFlagsAndAttributes() { $stamp =
new AmqpStamp(null, \AMQP_DURABLE,
['delivery_mode' => 'unknown'
]);
$this->
assertNull($stamp->
getRoutingKey());
$this->
assertSame(\AMQP_DURABLE,
$stamp->
getFlags());
$this->
assertSame(['delivery_mode' => 'unknown'
],
$stamp->
getAttributes());
}