77use Illuminate \Support \Facades \Event ;
88use Illuminate \Support \Facades \Queue ;
99use Orchestra \Testbench \TestCase ;
10+ use PHPUnit \Framework \Attributes \Test ;
1011use Spatie \Valuestore \Valuestore ;
1112use Stancl \JobPipeline \JobPipeline ;
1213
@@ -26,7 +27,7 @@ public function setUp(): void
2627 $ this ->valuestore = Valuestore::make (__DIR__ . '/tmp/jobpipelinetest.json ' )->flush ();
2728 }
2829
29- /** @test */
30+ #[Test]
3031 public function job_pipeline_can_listen_to_any_event ()
3132 {
3233 Event::listen (TestEvent::class, JobPipeline::make ([
@@ -42,7 +43,7 @@ public function job_pipeline_can_listen_to_any_event()
4243 $ this ->assertSame ('bar ' , $ this ->valuestore ->get ('foo ' ));
4344 }
4445
45- /** @test */
46+ #[Test]
4647 public function job_pipeline_can_be_queued ()
4748 {
4849 Queue::fake ();
@@ -63,7 +64,7 @@ public function job_pipeline_can_be_queued()
6364 });
6465 }
6566
66- /** @test */
67+ #[Test]
6768 public function job_pipelines_run_when_queued ()
6869 {
6970 Event::listen (TestEvent::class, JobPipeline::make ([
@@ -81,7 +82,7 @@ public function job_pipelines_run_when_queued()
8182 $ this ->assertSame ('bar ' , $ this ->valuestore ->get ('foo ' ));
8283 }
8384
84- /** @test */
85+ #[Test]
8586 public function job_pipeline_executes_jobs_and_passes_the_object_sequentially ()
8687 {
8788 Event::listen (TestEvent::class, JobPipeline::make ([
@@ -98,7 +99,7 @@ public function job_pipeline_executes_jobs_and_passes_the_object_sequentially()
9899 $ this ->assertSame ('first job changed property ' , $ this ->valuestore ->get ('foo ' ));
99100 }
100101
101- /** @test */
102+ #[Test]
102103 public function send_can_return_multiple_arguments ()
103104 {
104105 Event::listen (TestEvent::class, JobPipeline::make ([
@@ -114,7 +115,7 @@ public function send_can_return_multiple_arguments()
114115 $ this ->assertSame (['a ' , 'b ' ], app ('test_args ' ));
115116 }
116117
117- /** @test */
118+ #[Test]
118119 public function the_pipeline_can_be_canceled_by_returning_false_from_any_job ()
119120 {
120121 Event::listen (TestEvent::class, JobPipeline::make ([
@@ -134,8 +135,8 @@ public function the_pipeline_can_be_canceled_by_returning_false_from_any_job()
134135 // Foo job is not excuted
135136 $ this ->assertFalse ($ this ->valuestore ->has ('foo ' ));
136137 }
137-
138- /** @test */
138+
139+ #[Test]
139140 public function the_pipeline_can_execute_failed_method_on_job ()
140141 {
141142 Event::listen (TestEvent::class, JobPipeline::make ([
@@ -151,7 +152,7 @@ public function the_pipeline_can_execute_failed_method_on_job()
151152 $ this ->assertEquals ($ this ->valuestore ->get ('exeception ' ), 'pipeline exception ' );
152153 }
153154
154- /** @test */
155+ #[Test]
155156 public function closures_can_be_used_as_jobs ()
156157 {
157158 $ passes = false ;
@@ -169,7 +170,7 @@ function (TestModel $model) use (&$passes) {
169170 $ this ->assertTrue ($ passes );
170171 }
171172
172- /** @test */
173+ #[Test]
173174 public function failures_in_closures_will_throw_correctly ()
174175 {
175176 $ this ->expectExceptionMessage ('foobar ' );
0 commit comments