File: ChannelConsumeTest.php

package info (click to toggle)
php-amqplib 3.7.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,068 kB
  • sloc: php: 13,145; makefile: 77; sh: 27
file content (17 lines) | stat: -rw-r--r-- 486 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

namespace PhpAmqpLib\Tests\Functional\Channel;

use PHPUnit\Framework\Attributes\Test;

class ChannelConsumeTest extends ChannelTestCase
{
    #[Test]
    public function basic_consume_same_tag_throws_exception()
    {
        $this->expectException(\InvalidArgumentException::class);
        list($queue, ,) = $this->channel->queue_declare();
        $consumerTag = $this->channel->basic_consume($queue, '');
        $this->channel->basic_consume($queue, $consumerTag);
    }
}