8
8
use Javaabu \QueryBuilder \Tests \Models \Brand ;
9
9
use Javaabu \QueryBuilder \Tests \Models \Product ;
10
10
use Javaabu \QueryBuilder \Tests \TestCase ;
11
+ use PHPUnit \Framework \Attributes \Test ;
11
12
12
13
class ApiControllerTest extends TestCase
13
14
{
@@ -28,7 +29,7 @@ protected function registerApiRoutes()
28
29
Route::get ('/products/{id} ' , [ProductsController::class, 'show ' ])->name ('products.show ' );
29
30
}
30
31
31
- /** @test */
32
+ #[Test]
32
33
public function it_can_list_api_models (): void
33
34
{
34
35
$ products = Product::factory ()->count (10 )->create ();
@@ -37,7 +38,7 @@ public function it_can_list_api_models(): void
37
38
->assertSuccessful ();
38
39
}
39
40
40
- /** @test */
41
+ #[Test]
41
42
public function it_can_show_api_models (): void
42
43
{
43
44
$ product = Product::factory ()->create ();
@@ -49,7 +50,7 @@ public function it_can_show_api_models(): void
49
50
]);
50
51
}
51
52
52
- /** @test */
53
+ #[Test]
53
54
public function it_can_filter_api_models (): void
54
55
{
55
56
$ product_1 = Product::factory ()->create ([
@@ -70,7 +71,7 @@ public function it_can_filter_api_models(): void
70
71
]);
71
72
}
72
73
73
- /** @test */
74
+ #[Test]
74
75
public function it_can_load_api_model_relations (): void
75
76
{
76
77
$ this ->withoutExceptionHandling ();
@@ -91,7 +92,7 @@ public function it_can_load_api_model_relations(): void
91
92
]);
92
93
}
93
94
94
- /** @test */
95
+ #[Test]
95
96
public function it_can_load_api_model_appends (): void
96
97
{
97
98
$ this ->withoutExceptionHandling ();
@@ -111,7 +112,7 @@ public function it_can_load_api_model_appends(): void
111
112
]);
112
113
}
113
114
114
- /** @test */
115
+ #[Test]
115
116
public function it_can_list_only_specific_api_model_fields (): void
116
117
{
117
118
$ this ->withoutExceptionHandling ();
@@ -131,7 +132,7 @@ public function it_can_list_only_specific_api_model_fields(): void
131
132
]);
132
133
}
133
134
134
- /** @test */
135
+ #[Test]
135
136
public function it_can_load_api_model_appends_from_fields_even_if_appends_is_blank (): void
136
137
{
137
138
$ this ->withoutExceptionHandling ();
0 commit comments