|
2 | 2 |
|
3 | 3 | namespace Tests; |
4 | 4 |
|
5 | | -use Illuminate\Support\Facades\Hash; |
6 | | -use Illuminate\Support\Facades\Artisan; |
7 | | -use Illuminate\Support\Facades\Notification; |
8 | | -use Illuminate\Auth\Notifications\ResetPassword; |
9 | | - |
10 | 5 | class MakeUserTest extends TestCase |
11 | 6 | { |
12 | 7 | /** @test */ |
13 | 8 | public function it_creates_a_new_user() |
14 | 9 | { |
15 | 10 | $this->artisan('make:user') |
16 | | - -> expectsQuestion( "What is the new user's email address?", "[email protected]") |
17 | | - ->expectsQuestion("What is the new user's name?", "Test User") |
18 | | - ->expectsQuestion("What is the new user's password? (blank generates a random one)", "") |
19 | | - ->expectsQuestion("Do you want to send a password reset email?", "no") |
20 | | - ->expectsQuestion("Do you have any custom user fields to add? Field=Value (blank continues)", ""); |
| 11 | + -> expectsQuestion( "What is the new user's email address?", '[email protected]') |
| 12 | + ->expectsQuestion("What is the new user's name?", 'Test User') |
| 13 | + ->expectsQuestion("What is the new user's password? (blank generates a random one)", '') |
| 14 | + ->expectsQuestion('Do you want to send a password reset email?', 'no') |
| 15 | + ->expectsQuestion('Do you have any custom user fields to add? Field=Value (blank continues)', ''); |
21 | 16 | } |
22 | 17 |
|
23 | 18 | /** @test */ |
24 | 19 | public function it_creates_a_new_user_with_additional_fields() |
25 | 20 | { |
26 | 21 | $this->artisan('make:user') |
27 | | - -> expectsQuestion( "What is the new user's email address?", "[email protected]") |
28 | | - ->expectsQuestion("What is the new user's name?", "Test User") |
29 | | - ->expectsQuestion("What is the new user's password? (blank generates a random one)", "") |
30 | | - ->expectsQuestion("Do you want to send a password reset email?", "no") |
31 | | - ->expectsQuestion("Do you have any custom user fields to add? Field=Value (blank continues)", "field=value") |
32 | | - ->expectsQuestion("Do you have any custom user fields to add? Field=Value (blank continues)", ""); |
| 22 | + -> expectsQuestion( "What is the new user's email address?", '[email protected]') |
| 23 | + ->expectsQuestion("What is the new user's name?", 'Test User') |
| 24 | + ->expectsQuestion("What is the new user's password? (blank generates a random one)", '') |
| 25 | + ->expectsQuestion('Do you want to send a password reset email?', 'no') |
| 26 | + ->expectsQuestion('Do you have any custom user fields to add? Field=Value (blank continues)', 'field=value') |
| 27 | + ->expectsQuestion('Do you have any custom user fields to add? Field=Value (blank continues)', ''); |
33 | 28 | } |
34 | 29 | } |
0 commit comments