Apply Laravel Pint fixes

This commit is contained in:
Bubka
2022-11-22 15:15:52 +01:00
parent d84dd6659e
commit d6fd8e3c52
178 changed files with 2409 additions and 2899 deletions

View File

@ -12,7 +12,6 @@ use Tests\FeatureTestCase;
*/
class UserStoreRequestTest extends FeatureTestCase
{
use WithoutMiddleware;
/**
@ -21,7 +20,7 @@ class UserStoreRequestTest extends FeatureTestCase
public function test_user_is_authorized()
{
$request = new UserStoreRequest();
$this->assertTrue($request->authorize());
}
@ -30,7 +29,7 @@ class UserStoreRequestTest extends FeatureTestCase
*/
public function test_valid_data(array $data) : void
{
$request = new UserStoreRequest();
$request = new UserStoreRequest();
$validator = Validator::make($data, $request->rules());
$this->assertFalse($validator->fails());
@ -43,10 +42,10 @@ class UserStoreRequestTest extends FeatureTestCase
{
return [
[[
'name' => 'John',
'email' => 'john@example.com',
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
'name' => 'John',
'email' => 'john@example.com',
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
]],
];
}
@ -58,15 +57,15 @@ class UserStoreRequestTest extends FeatureTestCase
{
$user = new \App\Models\User(
[
'name' => 'John',
'email' => 'john@example.com',
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
'name' => 'John',
'email' => 'john@example.com',
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
]
);
$user->save();
$request = new UserStoreRequest();
$request = new UserStoreRequest();
$validator = Validator::make($data, $request->rules());
$this->assertTrue($validator->fails());
@ -79,60 +78,59 @@ class UserStoreRequestTest extends FeatureTestCase
{
return [
[[
'name' => 'John', // unique
'email' => 'john@example.com',
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
'name' => 'John', // unique
'email' => 'john@example.com',
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
]],
[[
'name' => '', // required
'email' => 'john@example.com',
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
'name' => '', // required
'email' => 'john@example.com',
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
]],
[[
'name' => 'John',
'email' => '', // required
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
'name' => 'John',
'email' => '', // required
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
]],
[[
'name' => 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz', // max:255
'email' => 'john@example.com',
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
'name' => 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz', // max:255
'email' => 'john@example.com',
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
]],
[[
'name' => 'John',
'email' => 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz@example.com', // max:255
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
'name' => 'John',
'email' => 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz@example.com', // max:255
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
]],
[[
'name' => 'John',
'email' => 'johnexample.com', // email
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
'name' => 'John',
'email' => 'johnexample.com', // email
'password' => 'MyPassword',
'password_confirmation' => 'MyPassword',
]],
[[
'name' => 'John',
'email' => 'john@example.com',
'password' => '', // required
'password_confirmation' => '', // required
'name' => 'John',
'email' => 'john@example.com',
'password' => '', // required
'password_confirmation' => '', // required
]],
[[
'name' => 'John',
'email' => 'john@example.com',
'password' => 'MyPassword',
'password_confirmation' => 'anotherPassword', // confirmed
'name' => 'John',
'email' => 'john@example.com',
'password' => 'MyPassword',
'password_confirmation' => 'anotherPassword', // confirmed
]],
[[
'name' => 'John',
'email' => 'john@example.com',
'password' => 'pwd', // min:8
'password_confirmation' => 'pwd',
'name' => 'John',
'email' => 'john@example.com',
'password' => 'pwd', // min:8
'password_confirmation' => 'pwd',
]],
];
}
}
}