Skip to content

Commit aa273e8

Browse files
authored
Merge pull request #628 from fontebasso/support-php-8.4
Add PHP 8.4 to CI and fix test method naming to follow camelCase convention
2 parents d06427b + e82de4c commit aa273e8

File tree

8 files changed

+44
-44
lines changed

8 files changed

+44
-44
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: true
1515
matrix:
16-
php: ['8.1', '8.2', '8.3']
16+
php: ['8.1', '8.2', '8.3', '8.4']
1717
stability: ['prefer-lowest', 'prefer-stable']
1818
laravel: ['^10.0', '^11.0', '^12.0']
1919
exclude:

pint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"preset": "laravel",
33
"rules": {
44
"php_unit_method_casing": {
5-
"case": "camel_case"
5+
"case": "camel_case"
66
}
77
}
88
}

tests/Feature/ConnectorTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class ConnectorTest extends \VladimirYuldashev\LaravelQueueRabbitMQ\Tests\TestCase
1414
{
15-
public function test_lazy_connection(): void
15+
public function testLazyConnection(): void
1616
{
1717
$this->app['config']->set('queue.connections.rabbitmq', [
1818
'driver' => 'rabbitmq',
@@ -55,7 +55,7 @@ public function test_lazy_connection(): void
5555
$this->assertTrue($connection->getConnection()->isConnected());
5656
}
5757

58-
public function test_lazy_stream_connection(): void
58+
public function testLazyStreamConnection(): void
5959
{
6060
$this->app['config']->set('queue.connections.rabbitmq', [
6161
'driver' => 'rabbitmq',
@@ -98,7 +98,7 @@ public function test_lazy_stream_connection(): void
9898
$this->assertTrue($connection->getConnection()->isConnected());
9999
}
100100

101-
public function test_ssl_connection(): void
101+
public function testSslConnection(): void
102102
{
103103
$this->markTestSkipped();
104104

@@ -142,7 +142,7 @@ public function test_ssl_connection(): void
142142
}
143143

144144
// Test to validate ssl connection params
145-
public function test_no_verification_ssl_connection(): void
145+
public function testNoVerificationSslConnection(): void
146146
{
147147
$this->app['config']->set('queue.connections.rabbitmq', [
148148
'driver' => 'rabbitmq',

tests/Feature/QueueTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ protected function setUp(): void
2020
]);
2121
}
2222

23-
public function test_connection(): void
23+
public function testConnection(): void
2424
{
2525
$this->assertInstanceOf(AMQPStreamConnection::class, $this->connection()->getChannel()->getConnection());
2626
}
2727

28-
public function test_without_reconnect(): void
28+
public function testWithoutReconnect(): void
2929
{
3030
$queue = $this->connection('rabbitmq');
3131

tests/Feature/SslQueueTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function getEnvironmentSetUp($app): void
4343
]);
4444
}
4545

46-
public function test_connection(): void
46+
public function testConnection(): void
4747
{
4848
$this->assertInstanceOf(AMQPSSLConnection::class, $this->connection()->getChannel()->getConnection());
4949
}

tests/Feature/TestCase.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ protected function tearDown(): void
4040
parent::tearDown();
4141
}
4242

43-
public function test_size_does_not_throw_exception_on_unknown_queue(): void
43+
public function testSizeDoesNotThrowExceptionOnUnknownQueue(): void
4444
{
4545
$this->assertEmpty(0, Queue::size(Str::random()));
4646
}
4747

48-
public function test_pop_nothing(): void
48+
public function testPopNothing(): void
4949
{
5050
$this->assertNull(Queue::pop('foo'));
5151
}
5252

53-
public function test_push_raw(): void
53+
public function testPushRaw(): void
5454
{
5555
Queue::pushRaw($payload = Str::random());
5656

@@ -68,7 +68,7 @@ public function test_push_raw(): void
6868
$this->assertSame(0, Queue::size());
6969
}
7070

71-
public function test_push(): void
71+
public function testPush(): void
7272
{
7373
Queue::push(new TestJob);
7474

@@ -95,7 +95,7 @@ public function test_push(): void
9595
$this->assertSame(0, Queue::size());
9696
}
9797

98-
public function test_push_after_commit(): void
98+
public function testPushAfterCommit(): void
9999
{
100100
$transaction = new DatabaseTransactionsManager;
101101

@@ -122,7 +122,7 @@ public function test_push_after_commit(): void
122122
$this->assertSame(0, Queue::size());
123123
}
124124

125-
public function test_later_raw(): void
125+
public function testLaterRaw(): void
126126
{
127127
$payload = Str::random();
128128
$data = [Str::random() => Str::random()];
@@ -152,7 +152,7 @@ public function test_later_raw(): void
152152
$this->assertSame(0, Queue::size());
153153
}
154154

155-
public function test_later(): void
155+
public function testLater(): void
156156
{
157157
Queue::later(3, new TestJob);
158158

@@ -179,7 +179,7 @@ public function test_later(): void
179179
$this->assertSame(0, Queue::size());
180180
}
181181

182-
public function test_bulk(): void
182+
public function testBulk(): void
183183
{
184184
$count = 100;
185185
$jobs = [];
@@ -195,7 +195,7 @@ public function test_bulk(): void
195195
$this->assertSame($count, Queue::size());
196196
}
197197

198-
public function test_push_encrypted(): void
198+
public function testPushEncrypted(): void
199199
{
200200
Queue::push(new TestEncryptedJob);
201201

@@ -222,7 +222,7 @@ public function test_push_encrypted(): void
222222
$this->assertSame(0, Queue::size());
223223
}
224224

225-
public function test_push_encrypted_after_commit(): void
225+
public function testPushEncryptedAfterCommit(): void
226226
{
227227
$transaction = new DatabaseTransactionsManager;
228228

@@ -249,7 +249,7 @@ public function test_push_encrypted_after_commit(): void
249249
$this->assertSame(0, Queue::size());
250250
}
251251

252-
public function test_encrypted_later(): void
252+
public function testEncryptedLater(): void
253253
{
254254
Queue::later(3, new TestEncryptedJob);
255255

@@ -276,7 +276,7 @@ public function test_encrypted_later(): void
276276
$this->assertSame(0, Queue::size());
277277
}
278278

279-
public function test_encrypted_bulk(): void
279+
public function testEncryptedBulk(): void
280280
{
281281
$count = 100;
282282
$jobs = [];
@@ -292,7 +292,7 @@ public function test_encrypted_bulk(): void
292292
$this->assertSame($count, Queue::size());
293293
}
294294

295-
public function test_release_raw(): void
295+
public function testReleaseRaw(): void
296296
{
297297
Queue::pushRaw($payload = Str::random());
298298

@@ -318,7 +318,7 @@ public function test_release_raw(): void
318318
$this->assertSame(0, Queue::size());
319319
}
320320

321-
public function test_release(): void
321+
public function testRelease(): void
322322
{
323323
Queue::push(new TestJob);
324324

@@ -344,7 +344,7 @@ public function test_release(): void
344344
$this->assertSame(0, Queue::size());
345345
}
346346

347-
public function test_release_with_delay_raw(): void
347+
public function testReleaseWithDelayRaw(): void
348348
{
349349
Queue::pushRaw($payload = Str::random());
350350

@@ -375,7 +375,7 @@ public function test_release_with_delay_raw(): void
375375
$this->assertSame(0, Queue::size());
376376
}
377377

378-
public function test_release_in_the_past(): void
378+
public function testReleaseInThePast(): void
379379
{
380380
Queue::push(new TestJob);
381381

@@ -390,7 +390,7 @@ public function test_release_in_the_past(): void
390390
$this->assertSame(0, Queue::size());
391391
}
392392

393-
public function test_release_and_release_with_delay_attempts(): void
393+
public function testReleaseAndReleaseWithDelayAttempts(): void
394394
{
395395
Queue::push(new TestJob);
396396

@@ -417,7 +417,7 @@ public function test_release_and_release_with_delay_attempts(): void
417417
$this->assertSame(0, Queue::size());
418418
}
419419

420-
public function test_delete(): void
420+
public function testDelete(): void
421421
{
422422
Queue::push(new TestJob);
423423

@@ -431,7 +431,7 @@ public function test_delete(): void
431431
$this->assertNull(Queue::pop());
432432
}
433433

434-
public function test_failed(): void
434+
public function testFailed(): void
435435
{
436436
Queue::push(new TestJob);
437437

tests/Functional/RabbitMQQueueTest.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class RabbitMQQueueTest extends BaseTestCase
1111
{
12-
public function test_connection(): void
12+
public function testConnection(): void
1313
{
1414
$queue = $this->connection();
1515
$this->assertInstanceOf(RabbitMQQueue::class, $queue);
@@ -21,7 +21,7 @@ public function test_connection(): void
2121
$this->assertInstanceOf(RabbitMQQueue::class, $queue);
2222
}
2323

24-
public function test_config_reroute_failed(): void
24+
public function testConfigRerouteFailed(): void
2525
{
2626
$queue = $this->connection();
2727
$this->assertFalse($this->callProperty($queue, 'config')->isRerouteFailed());
@@ -36,7 +36,7 @@ public function test_config_reroute_failed(): void
3636
$this->assertFalse($this->callProperty($queue, 'config')->isRerouteFailed());
3737
}
3838

39-
public function test_config_prioritize_delayed(): void
39+
public function testConfigPrioritizeDelayed(): void
4040
{
4141
$queue = $this->connection();
4242
$this->assertFalse($this->callProperty($queue, 'config')->isPrioritizeDelayed());
@@ -51,7 +51,7 @@ public function test_config_prioritize_delayed(): void
5151
$this->assertFalse($this->callProperty($queue, 'config')->isPrioritizeDelayed());
5252
}
5353

54-
public function test_queue_max_priority(): void
54+
public function testQueueMaxPriority(): void
5555
{
5656
$queue = $this->connection();
5757
$this->assertIsInt($this->callProperty($queue, 'config')->getQueueMaxPriority());
@@ -70,7 +70,7 @@ public function test_queue_max_priority(): void
7070
$this->assertSame(2, $this->callProperty($queue, 'config')->getQueueMaxPriority());
7171
}
7272

73-
public function test_config_exchange_type(): void
73+
public function testConfigExchangeType(): void
7474
{
7575
$queue = $this->connection();
7676
$this->assertSame(AMQPExchangeType::DIRECT, $this->callMethod($queue, 'getExchangeType'));
@@ -92,7 +92,7 @@ public function test_config_exchange_type(): void
9292
$this->assertSame(AMQPExchangeType::DIRECT, $this->callMethod($queue, 'getExchangeType'));
9393
}
9494

95-
public function test_exchange(): void
95+
public function testExchange(): void
9696
{
9797
$queue = $this->connection();
9898
$this->assertSame('test', $this->callMethod($queue, 'getExchange', ['test']));
@@ -119,7 +119,7 @@ public function test_exchange(): void
119119
$this->assertSame('', $this->callMethod($queue, 'getExchange', ['']));
120120
}
121121

122-
public function test_failed_exchange(): void
122+
public function testFailedExchange(): void
123123
{
124124
$queue = $this->connection();
125125
$this->assertSame('test', $this->callMethod($queue, 'getFailedExchange', ['test']));
@@ -146,7 +146,7 @@ public function test_failed_exchange(): void
146146
$this->assertSame('', $this->callMethod($queue, 'getFailedExchange', ['']));
147147
}
148148

149-
public function test_routing_key(): void
149+
public function testRoutingKey(): void
150150
{
151151
$queue = $this->connection();
152152
$this->assertSame('test', $this->callMethod($queue, 'getRoutingKey', ['test']));
@@ -165,7 +165,7 @@ public function test_routing_key(): void
165165
$this->assertSame('an.alternate.routing-key', $this->callMethod($queue, 'getRoutingKey', ['test']));
166166
}
167167

168-
public function test_failed_routing_key(): void
168+
public function testFailedRoutingKey(): void
169169
{
170170
$queue = $this->connection();
171171
$this->assertSame('test.failed', $this->callMethod($queue, 'getFailedRoutingKey', ['test']));
@@ -184,7 +184,7 @@ public function test_failed_routing_key(): void
184184
$this->assertSame('an.alternate.routing-key', $this->callMethod($queue, 'getFailedRoutingKey', ['test']));
185185
}
186186

187-
public function test_config_quorum(): void
187+
public function testConfigQuorum(): void
188188
{
189189
$queue = $this->connection();
190190
$this->assertFalse($this->callProperty($queue, 'config')->isQuorum());
@@ -202,7 +202,7 @@ public function test_config_quorum(): void
202202
$this->assertTrue($this->callProperty($queue, 'config')->isQuorum());
203203
}
204204

205-
public function test_declare_delete_exchange(): void
205+
public function testDeclareDeleteExchange(): void
206206
{
207207
$queue = $this->connection();
208208

@@ -217,7 +217,7 @@ public function test_declare_delete_exchange(): void
217217
$this->assertFalse($queue->isExchangeExists($name));
218218
}
219219

220-
public function test_declare_delete_queue(): void
220+
public function testDeclareDeleteQueue(): void
221221
{
222222
$queue = $this->connection();
223223

@@ -232,7 +232,7 @@ public function test_declare_delete_queue(): void
232232
$this->assertFalse($queue->isQueueExists($name));
233233
}
234234

235-
public function test_queue_arguments(): void
235+
public function testQueueArguments(): void
236236
{
237237
$name = Str::random();
238238

@@ -272,7 +272,7 @@ public function test_queue_arguments(): void
272272
$this->assertEquals(array_values($expected), array_values($actual));
273273
}
274274

275-
public function test_delay_queue_arguments(): void
275+
public function testDelayQueueArguments(): void
276276
{
277277
$name = Str::random();
278278
$ttl = 12000;

tests/Functional/TestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ protected function callProperty($object, string $property): mixed
236236
return $property->getValue($object);
237237
}
238238

239-
public function test_connect_channel(): void
239+
public function testConnectChannel(): void
240240
{
241241
$queue = $this->connection();
242242
$this->assertFalse($queue->getConnection()->isConnected());
@@ -248,7 +248,7 @@ public function test_connect_channel(): void
248248
$this->assertTrue($channel->is_open());
249249
}
250250

251-
public function test_reconnect(): void
251+
public function testReconnect(): void
252252
{
253253
$queue = $this->connection();
254254
$this->assertFalse($queue->getConnection()->isConnected());

0 commit comments

Comments
 (0)