diff --git a/.docker/Dockerfile b/.docker/Dockerfile new file mode 100644 index 00000000..0a450691 --- /dev/null +++ b/.docker/Dockerfile @@ -0,0 +1,16 @@ +FROM php:8.2-cli + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + git \ + zip \ + unzip \ + && rm -rf /var/lib/apt/lists/* + +# Install PHP extensions +RUN docker-php-ext-install sockets pcntl + +# Install Composer +COPY --from=composer:latest /usr/bin/composer /usr/bin/composer + +WORKDIR /app diff --git a/.gitignore b/.gitignore index 00dea824..55358473 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ composer.lock phpunit.xml .phpunit.result.cache .php_cs.cache +.phpunit.cache diff --git a/README.md b/README.md index 30a10df9..9d7ff9c0 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,14 @@ Only the latest version will get new features. Bug fixes will be provided using | Package Version | Laravel Version | Bug Fixes Until | | |-----------------|-----------------|------------------|---------------------------------------------------------------------------------------------| -| 13 | 9 | August 8th, 2023 | [Documentation](https://github.com/vyuldashev/laravel-queue-rabbitmq/blob/master/README.md) | +| 14 | 10, 11, 12 | August 8th, 2023 | [Documentation](https://github.com/vyuldashev/laravel-queue-rabbitmq/blob/master/README.md) | ## Installation You can install this package via composer using this command: ``` -composer require vladimir-yuldashev/laravel-queue-rabbitmq +composer require dejwcake/laravel-queue-rabbitmq ``` The package will automatically register itself. diff --git a/composer.json b/composer.json index caf8a0fc..c9d244b0 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,17 @@ { - "name": "vladimir-yuldashev/laravel-queue-rabbitmq", + "name": "dejwcake/laravel-queue-rabbitmq", "description": "RabbitMQ driver for Laravel Queue. Supports Laravel Horizon.", "license": "MIT", "authors": [ { "name": "Vladimir Yuldashev", "email": "misterio92@gmail.com" + }, + { + "name": "David Běhal", + "email": "david.behal@dejw.sk", + "homepage": "https://www.dejw.sk", + "role": "Developer" } ], "require": { diff --git a/docker-compose.yml b/docker-compose.yml index 4ac32caa..15311731 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.7' - services: rabbitmq: @@ -17,8 +15,6 @@ services: - "./tests/files/rootCA.pem:/rootCA.pem:ro" - "./tests/files/rootCA.key:/rootCA.key:ro" ports: - - "15671:15671" - - "15672:15672" - "5671:5671" - "5672:5672" @@ -39,5 +35,18 @@ services: ports: - 15671:15671 - 15672:15672 - - 5671:5671 - - 5672:5672 + + php: + build: + context: . + dockerfile: .docker/Dockerfile + environment: + HOST: rabbitmq + PORT: 5672 + volumes: + - .:/app + working_dir: /app + tty: true + stdin_open: true + depends_on: + - rabbitmq diff --git a/src/Queue/RabbitMQQueue.php b/src/Queue/RabbitMQQueue.php index fadedce5..04377a0d 100644 --- a/src/Queue/RabbitMQQueue.php +++ b/src/Queue/RabbitMQQueue.php @@ -62,14 +62,14 @@ class RabbitMQQueue extends Queue implements QueueContract, RabbitMQQueueContrac /** * Holds the Configuration */ - protected QueueConfig $config; + protected QueueConfig $rabbitMQConfig; /** * RabbitMQQueue constructor. */ public function __construct(QueueConfig $config) { - $this->config = $config; + $this->rabbitMQConfig = $config; $this->dispatchAfterCommit = $config->isDispatchAfterCommit(); } @@ -293,7 +293,7 @@ public function setConnection(AbstractConnection $connection): RabbitMQQueue */ public function getJobClass(): string { - $job = $this->getConfig()->getAbstractJob(); + $job = $this->getRabbitMQConfig()->getAbstractJob(); throw_if( ! is_a($job, RabbitMQJob::class, true), @@ -309,7 +309,7 @@ public function getJobClass(): string */ public function getQueue($queue = null): string { - return $queue ?: $this->getConfig()->getQueue(); + return $queue ?: $this->getRabbitMQConfig()->getQueue(); } /** @@ -523,7 +523,7 @@ protected function createMessage($payload, int $attempts = 0): array $properties['correlation_id'] = $correlationId; } - if ($this->getConfig()->isPrioritizeDelayed()) { + if ($this->getRabbitMQConfig()->isPrioritizeDelayed()) { $properties['priority'] = $attempts; } @@ -605,16 +605,16 @@ protected function getQueueArguments(string $destination): array // Messages with a priority which is higher than the queue's maximum, are treated as if they were // published with the maximum priority. // Quorum queues does not support priority. - if ($this->getConfig()->isPrioritizeDelayed() && ! $this->getConfig()->isQuorum()) { - $arguments['x-max-priority'] = $this->getConfig()->getQueueMaxPriority(); + if ($this->getRabbitMQConfig()->isPrioritizeDelayed() && ! $this->getRabbitMQConfig()->isQuorum()) { + $arguments['x-max-priority'] = $this->getRabbitMQConfig()->getQueueMaxPriority(); } - if ($this->getConfig()->isRerouteFailed()) { + if ($this->getRabbitMQConfig()->isRerouteFailed()) { $arguments['x-dead-letter-exchange'] = $this->getFailedExchange(); $arguments['x-dead-letter-routing-key'] = $this->getFailedRoutingKey($destination); } - if ($this->getConfig()->isQuorum()) { + if ($this->getRabbitMQConfig()->isQuorum()) { $arguments['x-queue-type'] = 'quorum'; } @@ -639,7 +639,7 @@ protected function getDelayQueueArguments(string $destination, int $ttl): array */ protected function getExchange(?string $exchange = null): string { - return $exchange ?? $this->getConfig()->getExchange(); + return $exchange ?? $this->getRabbitMQConfig()->getExchange(); } /** @@ -648,7 +648,7 @@ protected function getExchange(?string $exchange = null): string */ protected function getRoutingKey(string $destination): string { - return ltrim(sprintf($this->getConfig()->getExchangeRoutingKey(), $destination), '.'); + return ltrim(sprintf($this->getRabbitMQConfig()->getExchangeRoutingKey(), $destination), '.'); } /** @@ -656,7 +656,7 @@ protected function getRoutingKey(string $destination): string */ protected function getExchangeType(?string $type = null): string { - $constant = AMQPExchangeType::class.'::'.Str::upper($type ?: $this->getConfig()->getExchangeType()); + $constant = AMQPExchangeType::class.'::'.Str::upper($type ?: $this->getRabbitMQConfig()->getExchangeType()); return defined($constant) ? constant($constant) : AMQPExchangeType::DIRECT; } @@ -666,7 +666,7 @@ protected function getExchangeType(?string $type = null): string */ protected function getFailedExchange(?string $exchange = null): string { - return $exchange ?? $this->getConfig()->getFailedExchange(); + return $exchange ?? $this->getRabbitMQConfig()->getFailedExchange(); } /** @@ -675,7 +675,7 @@ protected function getFailedExchange(?string $exchange = null): string */ protected function getFailedRoutingKey(string $destination): string { - return ltrim(sprintf($this->getConfig()->getFailedRoutingKey(), $destination), '.'); + return ltrim(sprintf($this->getRabbitMQConfig()->getFailedRoutingKey(), $destination), '.'); } /** @@ -735,9 +735,9 @@ protected function publishProperties($queue, array $options = []): array return [$destination, $exchange, $exchangeType, $attempts]; } - protected function getConfig(): QueueConfig + protected function getRabbitMQConfig(): QueueConfig { - return $this->config; + return $this->rabbitMQConfig; } /** diff --git a/tests/Feature/ConnectorTest.php b/tests/Feature/ConnectorTest.php index f4e330c3..91660ad2 100644 --- a/tests/Feature/ConnectorTest.php +++ b/tests/Feature/ConnectorTest.php @@ -12,7 +12,7 @@ class ConnectorTest extends \VladimirYuldashev\LaravelQueueRabbitMQ\Tests\TestCase { - public function test_lazy_connection(): void + public function testLazyConnection(): void { $this->app['config']->set('queue.connections.rabbitmq', [ 'driver' => 'rabbitmq', @@ -55,7 +55,7 @@ public function test_lazy_connection(): void $this->assertTrue($connection->getConnection()->isConnected()); } - public function test_lazy_stream_connection(): void + public function testLazyStreamConnection(): void { $this->app['config']->set('queue.connections.rabbitmq', [ 'driver' => 'rabbitmq', @@ -98,7 +98,7 @@ public function test_lazy_stream_connection(): void $this->assertTrue($connection->getConnection()->isConnected()); } - public function test_ssl_connection(): void + public function testSslConnection(): void { $this->markTestSkipped(); @@ -142,7 +142,7 @@ public function test_ssl_connection(): void } // Test to validate ssl connection params - public function test_no_verification_ssl_connection(): void + public function testNoVerificationSslConnection(): void { $this->app['config']->set('queue.connections.rabbitmq', [ 'driver' => 'rabbitmq', diff --git a/tests/Feature/QueueTest.php b/tests/Feature/QueueTest.php index 609a48d8..ee324c9a 100644 --- a/tests/Feature/QueueTest.php +++ b/tests/Feature/QueueTest.php @@ -20,12 +20,12 @@ protected function setUp(): void ]); } - public function test_connection(): void + public function testConnection(): void { $this->assertInstanceOf(AMQPStreamConnection::class, $this->connection()->getChannel()->getConnection()); } - public function test_without_reconnect(): void + public function testWithoutReconnect(): void { $queue = $this->connection('rabbitmq'); diff --git a/tests/Feature/SslQueueTest.php b/tests/Feature/SslQueueTest.php index 53cf5d38..02181c96 100644 --- a/tests/Feature/SslQueueTest.php +++ b/tests/Feature/SslQueueTest.php @@ -43,7 +43,7 @@ protected function getEnvironmentSetUp($app): void ]); } - public function test_connection(): void + public function testConnection(): void { $this->assertInstanceOf(AMQPSSLConnection::class, $this->connection()->getChannel()->getConnection()); } diff --git a/tests/Feature/TestCase.php b/tests/Feature/TestCase.php index 7d0fab9a..5afda85d 100644 --- a/tests/Feature/TestCase.php +++ b/tests/Feature/TestCase.php @@ -40,17 +40,17 @@ protected function tearDown(): void parent::tearDown(); } - public function test_size_does_not_throw_exception_on_unknown_queue(): void + public function testSizeDoesNotThrowExceptionOnUnknownQueue(): void { $this->assertEmpty(0, Queue::size(Str::random())); } - public function test_pop_nothing(): void + public function testPopNothing(): void { $this->assertNull(Queue::pop('foo')); } - public function test_push_raw(): void + public function testPushRaw(): void { Queue::pushRaw($payload = Str::random()); @@ -68,7 +68,7 @@ public function test_push_raw(): void $this->assertSame(0, Queue::size()); } - public function test_push(): void + public function testPush(): void { Queue::push(new TestJob); @@ -95,7 +95,7 @@ public function test_push(): void $this->assertSame(0, Queue::size()); } - public function test_push_after_commit(): void + public function testPushAfterCommit(): void { $transaction = new DatabaseTransactionsManager; @@ -122,7 +122,7 @@ public function test_push_after_commit(): void $this->assertSame(0, Queue::size()); } - public function test_later_raw(): void + public function testLaterRaw(): void { $payload = Str::random(); $data = [Str::random() => Str::random()]; @@ -152,7 +152,7 @@ public function test_later_raw(): void $this->assertSame(0, Queue::size()); } - public function test_later(): void + public function testLater(): void { Queue::later(3, new TestJob); @@ -179,7 +179,7 @@ public function test_later(): void $this->assertSame(0, Queue::size()); } - public function test_bulk(): void + public function testBulk(): void { $count = 100; $jobs = []; @@ -195,7 +195,7 @@ public function test_bulk(): void $this->assertSame($count, Queue::size()); } - public function test_push_encrypted(): void + public function testPushEncrypted(): void { Queue::push(new TestEncryptedJob); @@ -222,7 +222,7 @@ public function test_push_encrypted(): void $this->assertSame(0, Queue::size()); } - public function test_push_encrypted_after_commit(): void + public function testPushEncryptedAfterCommit(): void { $transaction = new DatabaseTransactionsManager; @@ -249,7 +249,7 @@ public function test_push_encrypted_after_commit(): void $this->assertSame(0, Queue::size()); } - public function test_encrypted_later(): void + public function testEncryptedLater(): void { Queue::later(3, new TestEncryptedJob); @@ -276,7 +276,7 @@ public function test_encrypted_later(): void $this->assertSame(0, Queue::size()); } - public function test_encrypted_bulk(): void + public function testEncryptedBulk(): void { $count = 100; $jobs = []; @@ -292,7 +292,7 @@ public function test_encrypted_bulk(): void $this->assertSame($count, Queue::size()); } - public function test_release_raw(): void + public function testReleaseRaw(): void { Queue::pushRaw($payload = Str::random()); @@ -318,7 +318,7 @@ public function test_release_raw(): void $this->assertSame(0, Queue::size()); } - public function test_release(): void + public function testRelease(): void { Queue::push(new TestJob); @@ -344,7 +344,7 @@ public function test_release(): void $this->assertSame(0, Queue::size()); } - public function test_release_with_delay_raw(): void + public function testReleaseWithDelayRaw(): void { Queue::pushRaw($payload = Str::random()); @@ -375,7 +375,7 @@ public function test_release_with_delay_raw(): void $this->assertSame(0, Queue::size()); } - public function test_release_in_the_past(): void + public function testReleaseInThePast(): void { Queue::push(new TestJob); @@ -390,7 +390,7 @@ public function test_release_in_the_past(): void $this->assertSame(0, Queue::size()); } - public function test_release_and_release_with_delay_attempts(): void + public function testReleaseAndReleaseWithDelayAttempts(): void { Queue::push(new TestJob); @@ -417,7 +417,7 @@ public function test_release_and_release_with_delay_attempts(): void $this->assertSame(0, Queue::size()); } - public function test_delete(): void + public function testDelete(): void { Queue::push(new TestJob); @@ -431,7 +431,7 @@ public function test_delete(): void $this->assertNull(Queue::pop()); } - public function test_failed(): void + public function testFailed(): void { Queue::push(new TestJob); diff --git a/tests/Functional/RabbitMQQueueTest.php b/tests/Functional/RabbitMQQueueTest.php index 21a2e1d4..f3ca4005 100644 --- a/tests/Functional/RabbitMQQueueTest.php +++ b/tests/Functional/RabbitMQQueueTest.php @@ -9,7 +9,7 @@ class RabbitMQQueueTest extends BaseTestCase { - public function test_connection(): void + public function testConnection(): void { $queue = $this->connection(); $this->assertInstanceOf(RabbitMQQueue::class, $queue); @@ -21,56 +21,56 @@ public function test_connection(): void $this->assertInstanceOf(RabbitMQQueue::class, $queue); } - public function test_config_reroute_failed(): void + public function testConfigRerouteFailed(): void { $queue = $this->connection(); - $this->assertFalse($this->callProperty($queue, 'config')->isRerouteFailed()); + $this->assertFalse($this->callProperty($queue, 'rabbitMQConfig')->isRerouteFailed()); $queue = $this->connection('rabbitmq-with-options'); - $this->assertTrue($this->callProperty($queue, 'config')->isRerouteFailed()); + $this->assertTrue($this->callProperty($queue, 'rabbitMQConfig')->isRerouteFailed()); $queue = $this->connection('rabbitmq-with-options-empty'); - $this->assertFalse($this->callProperty($queue, 'config')->isRerouteFailed()); + $this->assertFalse($this->callProperty($queue, 'rabbitMQConfig')->isRerouteFailed()); $queue = $this->connection('rabbitmq-with-options-null'); - $this->assertFalse($this->callProperty($queue, 'config')->isRerouteFailed()); + $this->assertFalse($this->callProperty($queue, 'rabbitMQConfig')->isRerouteFailed()); } - public function test_config_prioritize_delayed(): void + public function testConfigPrioritizeDelayed(): void { $queue = $this->connection(); - $this->assertFalse($this->callProperty($queue, 'config')->isPrioritizeDelayed()); + $this->assertFalse($this->callProperty($queue, 'rabbitMQConfig')->isPrioritizeDelayed()); $queue = $this->connection('rabbitmq-with-options'); - $this->assertTrue($this->callProperty($queue, 'config')->isPrioritizeDelayed()); + $this->assertTrue($this->callProperty($queue, 'rabbitMQConfig')->isPrioritizeDelayed()); $queue = $this->connection('rabbitmq-with-options-empty'); - $this->assertFalse($this->callProperty($queue, 'config')->isPrioritizeDelayed()); + $this->assertFalse($this->callProperty($queue, 'rabbitMQConfig')->isPrioritizeDelayed()); $queue = $this->connection('rabbitmq-with-options-null'); - $this->assertFalse($this->callProperty($queue, 'config')->isPrioritizeDelayed()); + $this->assertFalse($this->callProperty($queue, 'rabbitMQConfig')->isPrioritizeDelayed()); } - public function test_queue_max_priority(): void + public function testQueueMaxPriority(): void { $queue = $this->connection(); - $this->assertIsInt($this->callProperty($queue, 'config')->getQueueMaxPriority()); - $this->assertSame(2, $this->callProperty($queue, 'config')->getQueueMaxPriority()); + $this->assertIsInt($this->callProperty($queue, 'rabbitMQConfig')->getQueueMaxPriority()); + $this->assertSame(2, $this->callProperty($queue, 'rabbitMQConfig')->getQueueMaxPriority()); $queue = $this->connection('rabbitmq-with-options'); - $this->assertIsInt($this->callProperty($queue, 'config')->getQueueMaxPriority()); - $this->assertSame(20, $this->callProperty($queue, 'config')->getQueueMaxPriority()); + $this->assertIsInt($this->callProperty($queue, 'rabbitMQConfig')->getQueueMaxPriority()); + $this->assertSame(20, $this->callProperty($queue, 'rabbitMQConfig')->getQueueMaxPriority()); $queue = $this->connection('rabbitmq-with-options-empty'); - $this->assertIsInt($this->callProperty($queue, 'config')->getQueueMaxPriority()); - $this->assertSame(2, $this->callProperty($queue, 'config')->getQueueMaxPriority()); + $this->assertIsInt($this->callProperty($queue, 'rabbitMQConfig')->getQueueMaxPriority()); + $this->assertSame(2, $this->callProperty($queue, 'rabbitMQConfig')->getQueueMaxPriority()); $queue = $this->connection('rabbitmq-with-options-null'); - $this->assertIsInt($this->callProperty($queue, 'config')->getQueueMaxPriority()); - $this->assertSame(2, $this->callProperty($queue, 'config')->getQueueMaxPriority()); + $this->assertIsInt($this->callProperty($queue, 'rabbitMQConfig')->getQueueMaxPriority()); + $this->assertSame(2, $this->callProperty($queue, 'rabbitMQConfig')->getQueueMaxPriority()); } - public function test_config_exchange_type(): void + public function testConfigExchangeType(): void { $queue = $this->connection(); $this->assertSame(AMQPExchangeType::DIRECT, $this->callMethod($queue, 'getExchangeType')); @@ -88,11 +88,11 @@ public function test_config_exchange_type(): void $this->assertSame(AMQPExchangeType::DIRECT, $this->callMethod($queue, 'getExchangeType')); // testing an unkown type with a default - $this->callProperty($queue, 'config')->setExchangeType('unknown'); + $this->callProperty($queue, 'rabbitMQConfig')->setExchangeType('unknown'); $this->assertSame(AMQPExchangeType::DIRECT, $this->callMethod($queue, 'getExchangeType')); } - public function test_exchange(): void + public function testExchange(): void { $queue = $this->connection(); $this->assertSame('test', $this->callMethod($queue, 'getExchange', ['test'])); @@ -119,7 +119,7 @@ public function test_exchange(): void $this->assertSame('', $this->callMethod($queue, 'getExchange', [''])); } - public function test_failed_exchange(): void + public function testFailedExchange(): void { $queue = $this->connection(); $this->assertSame('test', $this->callMethod($queue, 'getFailedExchange', ['test'])); @@ -146,7 +146,7 @@ public function test_failed_exchange(): void $this->assertSame('', $this->callMethod($queue, 'getFailedExchange', [''])); } - public function test_routing_key(): void + public function testRoutingKey(): void { $queue = $this->connection(); $this->assertSame('test', $this->callMethod($queue, 'getRoutingKey', ['test'])); @@ -161,11 +161,11 @@ public function test_routing_key(): void $queue = $this->connection('rabbitmq-with-options-null'); $this->assertSame('test', $this->callMethod($queue, 'getRoutingKey', ['test'])); - $this->callProperty($queue, 'config')->setExchangeRoutingKey('.an.alternate.routing-key'); + $this->callProperty($queue, 'rabbitMQConfig')->setExchangeRoutingKey('.an.alternate.routing-key'); $this->assertSame('an.alternate.routing-key', $this->callMethod($queue, 'getRoutingKey', ['test'])); } - public function test_failed_routing_key(): void + public function testFailedRoutingKey(): void { $queue = $this->connection(); $this->assertSame('test.failed', $this->callMethod($queue, 'getFailedRoutingKey', ['test'])); @@ -180,29 +180,29 @@ public function test_failed_routing_key(): void $queue = $this->connection('rabbitmq-with-options-null'); $this->assertSame('test.failed', $this->callMethod($queue, 'getFailedRoutingKey', ['test'])); - $this->callProperty($queue, 'config')->setFailedRoutingKey('.an.alternate.routing-key'); + $this->callProperty($queue, 'rabbitMQConfig')->setFailedRoutingKey('.an.alternate.routing-key'); $this->assertSame('an.alternate.routing-key', $this->callMethod($queue, 'getFailedRoutingKey', ['test'])); } - public function test_config_quorum(): void + public function testConfigQuorum(): void { $queue = $this->connection(); - $this->assertFalse($this->callProperty($queue, 'config')->isQuorum()); + $this->assertFalse($this->callProperty($queue, 'rabbitMQConfig')->isQuorum()); $queue = $this->connection('rabbitmq-with-options'); - $this->assertFalse($this->callProperty($queue, 'config')->isQuorum()); + $this->assertFalse($this->callProperty($queue, 'rabbitMQConfig')->isQuorum()); $queue = $this->connection('rabbitmq-with-options-empty'); - $this->assertFalse($this->callProperty($queue, 'config')->isQuorum()); + $this->assertFalse($this->callProperty($queue, 'rabbitMQConfig')->isQuorum()); $queue = $this->connection('rabbitmq-with-options-null'); - $this->assertFalse($this->callProperty($queue, 'config')->isQuorum()); + $this->assertFalse($this->callProperty($queue, 'rabbitMQConfig')->isQuorum()); $queue = $this->connection('rabbitmq-with-quorum-options'); - $this->assertTrue($this->callProperty($queue, 'config')->isQuorum()); + $this->assertTrue($this->callProperty($queue, 'rabbitMQConfig')->isQuorum()); } - public function test_declare_delete_exchange(): void + public function testDeclareDeleteExchange(): void { $queue = $this->connection(); @@ -217,7 +217,7 @@ public function test_declare_delete_exchange(): void $this->assertFalse($queue->isExchangeExists($name)); } - public function test_declare_delete_queue(): void + public function testDeclareDeleteQueue(): void { $queue = $this->connection(); @@ -232,7 +232,7 @@ public function test_declare_delete_queue(): void $this->assertFalse($queue->isQueueExists($name)); } - public function test_queue_arguments(): void + public function testQueueArguments(): void { $name = Str::random(); @@ -272,7 +272,7 @@ public function test_queue_arguments(): void $this->assertEquals(array_values($expected), array_values($actual)); } - public function test_delay_queue_arguments(): void + public function testDelayQueueArguments(): void { $name = Str::random(); $ttl = 12000; diff --git a/tests/Functional/TestCase.php b/tests/Functional/TestCase.php index b21aeaf8..8b843561 100644 --- a/tests/Functional/TestCase.php +++ b/tests/Functional/TestCase.php @@ -236,7 +236,7 @@ protected function callProperty($object, string $property): mixed return $property->getValue($object); } - public function test_connect_channel(): void + public function testConnectChannel(): void { $queue = $this->connection(); $this->assertFalse($queue->getConnection()->isConnected()); @@ -248,7 +248,7 @@ public function test_connect_channel(): void $this->assertTrue($channel->is_open()); } - public function test_reconnect(): void + public function testReconnect(): void { $queue = $this->connection(); $this->assertFalse($queue->getConnection()->isConnected());