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

@ -13,7 +13,6 @@ use Tests\TestCase;
*/
class UserUpdateRequestTest extends TestCase
{
use WithoutMiddleware;
/**
@ -26,7 +25,7 @@ class UserUpdateRequestTest extends TestCase
->andReturn(true);
$request = new UserUpdateRequest();
$this->assertTrue($request->authorize());
}
@ -35,7 +34,7 @@ class UserUpdateRequestTest extends TestCase
*/
public function test_valid_data(array $data) : void
{
$request = new UserUpdateRequest();
$request = new UserUpdateRequest();
$validator = Validator::make($data, $request->rules());
$this->assertFalse($validator->fails());
@ -48,9 +47,9 @@ class UserUpdateRequestTest extends TestCase
{
return [
[[
'name' => 'John',
'email' => 'john@example.com',
'password' => 'MyPassword'
'name' => 'John',
'email' => 'john@example.com',
'password' => 'MyPassword',
]],
];
}
@ -59,8 +58,8 @@ class UserUpdateRequestTest extends TestCase
* @dataProvider provideInvalidData
*/
public function test_invalid_data(array $data) : void
{
$request = new UserUpdateRequest();
{
$request = new UserUpdateRequest();
$validator = Validator::make($data, $request->rules());
$this->assertTrue($validator->fails());
@ -73,46 +72,45 @@ class UserUpdateRequestTest extends TestCase
{
return [
[[
'name' => '', // required
'email' => 'john@example.com',
'password' => 'MyPassword',
'name' => '', // required
'email' => 'john@example.com',
'password' => 'MyPassword',
]],
[[
'name' => 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz', // max:255
'email' => 'john@example.com',
'password' => 'MyPassword',
'name' => 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz', // max:255
'email' => 'john@example.com',
'password' => 'MyPassword',
]],
[[
'name' => true, // string
'email' => 'john@example.com',
'password' => 'MyPassword',
'name' => true, // string
'email' => 'john@example.com',
'password' => 'MyPassword',
]],
[[
'name' => 'John',
'email' => '', // required
'password' => 'MyPassword',
'name' => 'John',
'email' => '', // required
'password' => 'MyPassword',
]],
[[
'name' => 'John',
'email' => 0, // string
'password' => 'MyPassword',
'name' => 'John',
'email' => 0, // string
'password' => 'MyPassword',
]],
[[
'name' => 'John',
'email' => 'johnexample.com', // email
'password' => 'MyPassword',
'name' => 'John',
'email' => 'johnexample.com', // email
'password' => 'MyPassword',
]],
[[
'name' => 'John',
'email' => 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz@example.com', // max:255
'password' => 'MyPassword',
'name' => 'John',
'email' => 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz@example.com', // max:255
'password' => 'MyPassword',
]],
[[
'name' => 'John',
'email' => 'john@example.com',
'password' => '', // required
'name' => 'John',
'email' => 'john@example.com',
'password' => '', // required
]],
];
}
}
}