mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-14 07:48:37 +02:00
Apply Laravel Pint fixes
This commit is contained in:
@ -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
|
||||
]],
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user