diff --git a/src/app/User/Tests/User_RegisterTest.php b/src/app/User/Tests/User_RegisterTest.php index 7ed7737..3c5a78b 100644 --- a/src/app/User/Tests/User_RegisterTest.php +++ b/src/app/User/Tests/User_RegisterTest.php @@ -29,11 +29,7 @@ protected function refresh() } } - /** - * @test - * @testdox User registration test successfully (some properties are null) - */ - public function test1(): void + public function test_register_user_with_properties_nullable(): void { $request = [ 'first_name' => 'Cristiano', @@ -48,17 +44,14 @@ public function test1(): void $response = $this ->postJson( - 'api/user/register', + 'api/users/register', $request ); + $this->assertEquals(201, $response->getStatusCode()); } - /** - * @test - * @testdox User registration test with invalid data (all properties are requested) - */ - public function test2(): void + public function test_failed_with_invalid_data(): void { $request = [ 'first_name' => 'Lionel', @@ -73,7 +66,7 @@ public function test2(): void $response = $this ->postJson( - 'api/user/register', + 'api/users/register', $request ); diff --git a/src/app/User/Tests/User_ShowTest.php b/src/app/User/Tests/User_ShowTest.php index b6401fb..6ede33e 100644 --- a/src/app/User/Tests/User_ShowTest.php +++ b/src/app/User/Tests/User_ShowTest.php @@ -9,7 +9,7 @@ class User_ShowTest extends TestCase { - private User $user; + private $user; protected function setUp(): void { @@ -33,11 +33,7 @@ protected function refresh() } } - /** - * @test - * @testdox User registration test successfully (some properties are null) - */ - public function test1(): void + public function test_success_with_nullable_properties(): void { $user = User::create([ 'first_name' => 'Lionel', @@ -52,15 +48,11 @@ public function test1(): void $userId = $user->id; - $response = $this->getJson("api/user/show/{$userId}"); + $response = $this->getJson("api/users/show/{$userId}"); $this->assertInstanceOf(TestResponse::class, $response); } - /** - * @test - * @testdox User registration test with invalid data (all properties are requested) - */ - public function test2(): void + public function test_failed_with_invalid_property(): void { $user = User::create([ 'first_name' => 'Cristiano', @@ -75,7 +67,7 @@ public function test2(): void $userId = $user->id; - $response = $this->getJson("api/user/show/{$userId}"); + $response = $this->getJson("api/users/show/{$userId}"); $this->assertEquals(200, $response->getStatusCode());