Skip to content

Commit 0ff6ae6

Browse files
authored
fix: deprecated error in tests (#501)
1 parent cea2b0d commit 0ff6ae6

File tree

1 file changed

+33
-23
lines changed

1 file changed

+33
-23
lines changed

tests/DTOs/QueueWorkerTest.php

+33-23
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
)->queuesToConsume->toBe(['default']
1818
);
1919

20-
expect(Arr::first(array_filter($configObject, fn (QueueConfig $config) => $config->alias === $worker)))->memoryLimit->toBe(128);
21-
expect(Arr::first(array_filter($configObject, fn (QueueConfig $config) => $config->alias === $worker)))->timeout->toBe(60);
20+
expect(Arr::first(array_filter($configObject,
21+
fn (QueueConfig $config) => $config->alias === $worker)))->memoryLimit->toBe(128);
22+
expect(Arr::first(array_filter($configObject,
23+
fn (QueueConfig $config) => $config->alias === $worker)))->timeout->toBe(60);
2224

2325
continue;
2426
}
@@ -29,37 +31,45 @@
2931
)->queuesToConsume->toBe($worker['queues'] ?? ['default']
3032
);
3133

32-
expect(Arr::first(array_filter($configObject, fn (QueueConfig $config) => $config->alias === $alias)))->memoryLimit->toBe($worker['memory_limit'] ?? 128);
33-
expect(Arr::first(array_filter($configObject, fn (QueueConfig $config) => $config->alias === $alias)))->timeout->toBe($worker['timeout'] ?? 60);
34+
expect(Arr::first(array_filter($configObject,
35+
fn (QueueConfig $config) => $config->alias === $alias)))->memoryLimit->toBe($worker['memory_limit'] ?? 128);
36+
expect(Arr::first(array_filter($configObject,
37+
fn (QueueConfig $config) => $config->alias === $alias)))->timeout->toBe($worker['timeout'] ?? 60);
3438
}
3539
})->with([
3640
[
37-
'queue_workers' => [
38-
'some_worker' => [
39-
'queues' => ['default'],
40-
'memory_limit' => 64,
41-
'timeout' => 60,
41+
[
42+
'queue_workers' => [
43+
'some_worker' => [
44+
'queues' => ['default'],
45+
'memory_limit' => 64,
46+
'timeout' => 60,
47+
],
4248
],
4349
],
4450
],
4551
[
46-
'queue_workers' => [
47-
'some_worker' => [],
48-
'another_worker' => [],
52+
[
53+
'queue_workers' => [
54+
'some_worker' => [],
55+
'another_worker' => [],
56+
],
4957
],
5058
],
5159
[
52-
'queue_workers' => [
53-
'some_worker' => [
54-
],
55-
'another_worker' => [
56-
'queues' => ['default', 'another'],
57-
],
58-
'yet_another_worker' => [
59-
'memory_limit' => 256,
60-
],
61-
'one_more_worker' => [
62-
'timeout' => 120,
60+
[
61+
'queue_workers' => [
62+
'some_worker' => [
63+
],
64+
'another_worker' => [
65+
'queues' => ['default', 'another'],
66+
],
67+
'yet_another_worker' => [
68+
'memory_limit' => 256,
69+
],
70+
'one_more_worker' => [
71+
'timeout' => 120,
72+
],
6373
],
6474
],
6575
],

0 commit comments

Comments
 (0)