Skip to content

Commit 0ba0b99

Browse files
committed
Fix "Metadata found in doc-comment"
1 parent c30151a commit 0ba0b99

File tree

5 files changed

+50
-107
lines changed

5 files changed

+50
-107
lines changed

tests/CloudTasksApiTest.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Google\Cloud\Tasks\V2\HttpRequest;
1111
use Google\Cloud\Tasks\V2\Task;
1212
use Google\Protobuf\Timestamp;
13+
use PHPUnit\Framework\Attributes\Test;
1314
use Stackkit\LaravelGoogleCloudTasksQueue\CloudTasksApi;
1415

1516
class CloudTasksApiTest extends TestCase
@@ -41,9 +42,7 @@ protected function setUp(): void
4142

4243
}
4344

44-
/**
45-
* @test
46-
*/
45+
#[Test]
4746
public function test_create_task()
4847
{
4948
// Arrange
@@ -72,9 +71,7 @@ public function test_create_task()
7271
);
7372
}
7473

75-
/**
76-
* @test
77-
*/
74+
#[Test]
7875
public function test_delete_task_on_non_existing_task()
7976
{
8077
// Assert
@@ -93,9 +90,7 @@ public function test_delete_task_on_non_existing_task()
9390

9491
}
9592

96-
/**
97-
* @test
98-
*/
93+
#[Test]
9994
public function test_delete_task()
10095
{
10196
// Arrange

tests/ConfigHandlerTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace Tests;
66

77
use Google\Cloud\Tasks\V2\Task;
8+
use PHPUnit\Framework\Attributes\Test;
89
use Stackkit\LaravelGoogleCloudTasksQueue\CloudTasksApi;
910
use Tests\Support\SimpleJob;
1011

@@ -26,7 +27,7 @@ public function test_it_allows_a_handler_url_to_contain_path(string $handler, st
2627
});
2728
}
2829

29-
/** @test */
30+
#[Test]
3031
public function the_handle_route_task_uri_can_be_configured(): void
3132
{
3233
CloudTasksApi::fake();
@@ -40,7 +41,7 @@ public function the_handle_route_task_uri_can_be_configured(): void
4041
});
4142
}
4243

43-
/** @test */
44+
#[Test]
4445
public function the_handle_route_task_uri_in_combination_with_path_can_be_configured(): void
4546
{
4647
CloudTasksApi::fake();

tests/QueueAppEngineTest.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace Tests;
66

77
use Google\Cloud\Tasks\V2\Task;
8+
use PHPUnit\Framework\Attributes\Test;
89
use Stackkit\LaravelGoogleCloudTasksQueue\CloudTasksApi;
910
use Tests\Support\SimpleJob;
1011

@@ -17,9 +18,7 @@ protected function setUp(): void
1718
$this->withTaskType('appengine');
1819
}
1920

20-
/**
21-
* @test
22-
*/
21+
#[Test]
2322
public function an_app_engine_http_request_with_the_handler_url_is_made()
2423
{
2524
// Arrange
@@ -34,9 +33,7 @@ public function an_app_engine_http_request_with_the_handler_url_is_made()
3433
});
3534
}
3635

37-
/**
38-
* @test
39-
*/
36+
#[Test]
4037
public function it_routes_to_the_service()
4138
{
4239
// Arrange
@@ -51,9 +48,7 @@ public function it_routes_to_the_service()
5148
});
5249
}
5350

54-
/**
55-
* @test
56-
*/
51+
#[Test]
5752
public function it_contains_the_payload()
5853
{
5954
// Arrange

tests/QueueTest.php

Lines changed: 23 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Illuminate\Support\Facades\DB;
1515
use Illuminate\Support\Facades\Event;
1616
use Illuminate\Support\Facades\Queue;
17+
use PHPUnit\Framework\Attributes\Test;
1718
use Stackkit\LaravelGoogleCloudTasksQueue\CloudTasksApi;
1819
use Stackkit\LaravelGoogleCloudTasksQueue\CloudTasksQueue;
1920
use Stackkit\LaravelGoogleCloudTasksQueue\Events\JobReleased;
@@ -27,9 +28,7 @@
2728

2829
class QueueTest extends TestCase
2930
{
30-
/**
31-
* @test
32-
*/
31+
#[Test]
3332
public function a_http_request_with_the_handler_url_is_made()
3433
{
3534
// Arrange
@@ -44,9 +43,7 @@ public function a_http_request_with_the_handler_url_is_made()
4443
});
4544
}
4645

47-
/**
48-
* @test
49-
*/
46+
#[Test]
5047
public function it_posts_to_the_handler()
5148
{
5249
// Arrange
@@ -61,9 +58,7 @@ public function it_posts_to_the_handler()
6158
});
6259
}
6360

64-
/**
65-
* @test
66-
*/
61+
#[Test]
6762
public function it_posts_to_the_correct_handler_url()
6863
{
6964
// Arrange
@@ -79,9 +74,7 @@ public function it_posts_to_the_correct_handler_url()
7974
});
8075
}
8176

82-
/**
83-
* @test
84-
*/
77+
#[Test]
8578
public function it_posts_the_serialized_job_payload_to_the_handler()
8679
{
8780
// Arrange
@@ -100,9 +93,7 @@ public function it_posts_the_serialized_job_payload_to_the_handler()
10093
});
10194
}
10295

103-
/**
104-
* @test
105-
*/
96+
#[Test]
10697
public function it_will_set_the_scheduled_time_when_dispatching_later()
10798
{
10899
// Arrange
@@ -118,9 +109,7 @@ public function it_will_set_the_scheduled_time_when_dispatching_later()
118109
});
119110
}
120111

121-
/**
122-
* @test
123-
*/
112+
#[Test]
124113
public function test_dispatch_deadline_config()
125114
{
126115
// Arrange
@@ -137,9 +126,7 @@ public function test_dispatch_deadline_config()
137126
});
138127
}
139128

140-
/**
141-
* @test
142-
*/
129+
#[Test]
143130
public function it_posts_the_task_the_correct_queue()
144131
{
145132
// Arrange
@@ -169,9 +156,7 @@ public function it_posts_the_task_the_correct_queue()
169156
});
170157
}
171158

172-
/**
173-
* @test
174-
*/
159+
#[Test]
175160
public function it_can_dispatch_after_commit_inline()
176161
{
177162
// Arrange
@@ -191,9 +176,7 @@ public function it_can_dispatch_after_commit_inline()
191176
});
192177
}
193178

194-
/**
195-
* @test
196-
*/
179+
#[Test]
197180
public function it_can_dispatch_after_commit_through_config()
198181
{
199182
// Arrange
@@ -214,9 +197,7 @@ public function it_can_dispatch_after_commit_through_config()
214197
});
215198
}
216199

217-
/**
218-
* @test
219-
*/
200+
#[Test]
220201
public function jobs_can_be_released()
221202
{
222203
// Arrange
@@ -258,9 +239,7 @@ public function jobs_can_be_released()
258239
});
259240
}
260241

261-
/**
262-
* @test
263-
*/
242+
#[Test]
264243
public function jobs_can_be_released_with_a_delay()
265244
{
266245
// Arrange
@@ -287,7 +266,7 @@ public function jobs_can_be_released_with_a_delay()
287266
});
288267
}
289268

290-
/** @test */
269+
#[Test]
291270
public function test_default_backoff()
292271
{
293272
// Arrange
@@ -303,7 +282,7 @@ public function test_default_backoff()
303282
});
304283
}
305284

306-
/** @test */
285+
#[Test]
307286
public function test_backoff_from_queue_config()
308287
{
309288
// Arrange
@@ -322,7 +301,7 @@ public function test_backoff_from_queue_config()
322301
});
323302
}
324303

325-
/** @test */
304+
#[Test]
326305
public function test_backoff_from_job()
327306
{
328307
// Arrange
@@ -342,7 +321,7 @@ public function test_backoff_from_job()
342321
});
343322
}
344323

345-
/** @test */
324+
#[Test]
346325
public function test_exponential_backoff_from_job_method()
347326
{
348327
// Arrange
@@ -370,7 +349,7 @@ public function test_exponential_backoff_from_job_method()
370349
});
371350
}
372351

373-
/** @test */
352+
#[Test]
374353
public function test_failing_method_on_job()
375354
{
376355
// Arrange
@@ -387,7 +366,7 @@ public function test_failing_method_on_job()
387366
Event::assertDispatched(fn (JobOutput $event) => $event->output === 'FailingJob:failed');
388367
}
389368

390-
/** @test */
369+
#[Test]
391370
public function test_queue_before_and_after_hooks()
392371
{
393372
// Arrange
@@ -408,7 +387,7 @@ public function test_queue_before_and_after_hooks()
408387
Event::assertDispatched(fn (JobOutput $event) => $event->output === 'Queue::after:Tests\Support\SimpleJob');
409388
}
410389

411-
/** @test */
390+
#[Test]
412391
public function test_queue_looping_hook_not_supported_with_this_package()
413392
{
414393
// Arrange
@@ -426,7 +405,7 @@ public function test_queue_looping_hook_not_supported_with_this_package()
426405
Event::assertDispatched(fn (JobOutput $event) => $event->output === 'SimpleJob:success');
427406
}
428407

429-
/** @test */
408+
#[Test]
430409
public function test_ignoring_jobs_with_deleted_models()
431410
{
432411
// Arrange
@@ -457,9 +436,7 @@ public function test_ignoring_jobs_with_deleted_models()
457436
CloudTasksApi::assertTaskNotDeleted($job->task->getName());
458437
}
459438

460-
/**
461-
* @test
462-
*/
439+
#[Test]
463440
public function it_adds_a_task_name_based_on_the_display_name()
464441
{
465442
// Arrange
@@ -477,9 +454,7 @@ public function it_adds_a_task_name_based_on_the_display_name()
477454
});
478455
}
479456

480-
/**
481-
* @test
482-
*/
457+
#[Test]
483458
public function headers_can_be_added_to_the_task()
484459
{
485460
// Arrange
@@ -498,9 +473,7 @@ public function headers_can_be_added_to_the_task()
498473
});
499474
}
500475

501-
/**
502-
* @test
503-
*/
476+
#[Test]
504477
public function headers_can_be_added_to_the_task_with_job_context()
505478
{
506479
// Arrange

0 commit comments

Comments
 (0)