Skip to content

Commit b014858

Browse files
committed
prune # of tests (slightly)
1 parent adda7ed commit b014858

File tree

5 files changed

+4
-389
lines changed

5 files changed

+4
-389
lines changed

src/Resources/scaffolds/6.0/change-password/tests/Functional/ChangePasswordTest.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -127,27 +127,6 @@ public function testNewPasswordsMustMatch(): void
127127
$this->assertSame($currentPassword, $user->getPassword());
128128
}
129129

130-
public function testNewPasswordMustBeMinLength(): void
131-
{
132-
$user = UserFactory::createOne(['email' => 'mary@example.com', 'password' => '1234']);
133-
$currentPassword = $user->getPassword();
134-
135-
$this->browser()
136-
->actingAs($user->object())
137-
->visit('/user/change-password')
138-
->fillField('Current Password', '1234')
139-
->fillField('New Password', '4321')
140-
->fillField('Repeat New Password', '4321')
141-
->click('Change Password')
142-
->assertSuccessful()
143-
->assertOn('/user/change-password')
144-
->assertSee('Your password should be at least 6 characters')
145-
->assertAuthenticated('mary@example.com')
146-
;
147-
148-
$this->assertSame($currentPassword, $user->getPassword());
149-
}
150-
151130
public function testCannotAccessChangePasswordPageIfNotLoggedIn(): void
152131
{
153132
$this->browser()

src/Resources/scaffolds/6.0/profile/tests/Functional/ProfileTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testCanUpdateProfile(): void
3737
$this->assertSame('John Smith', $user->getName());
3838
}
3939

40-
public function testNameIsRequired(): void
40+
public function testValidation(): void
4141
{
4242
$user = UserFactory::createOne(['name' => 'Mary Edwards']);
4343

src/Resources/scaffolds/6.0/register/tests/Functional/RegisterTest.php

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -42,32 +42,17 @@ public function testCanRegister(): void
4242
UserFactory::assert()->exists(['name' => 'Madison', 'email' => 'madison@example.com']);
4343
}
4444

45-
public function testNameIsRequired(): void
45+
public function testValidation(): void
4646
{
4747
$this->browser()
4848
->throwExceptions()
4949
->visit('/register')
5050
->assertSuccessful()
51-
->fillField('Email', 'madison@example.com')
52-
->fillField('Password', 'password')
53-
->click('Register')
54-
->assertOn('/register')
55-
->assertSee('Name is required')
56-
->assertNotAuthenticated()
57-
;
58-
}
59-
60-
public function testEmailIsRequired(): void
61-
{
62-
$this->browser()
63-
->throwExceptions()
64-
->visit('/register')
65-
->assertSuccessful()
66-
->fillField('Name', 'Madison')
67-
->fillField('Password', 'password')
6851
->click('Register')
6952
->assertOn('/register')
7053
->assertSee('Email is required')
54+
->assertSee('Please enter a password')
55+
->assertSee('Name is required')
7156
->assertNotAuthenticated()
7257
;
7358
}
@@ -105,35 +90,4 @@ public function testEmailMustBeUnique(): void
10590
->assertNotAuthenticated()
10691
;
10792
}
108-
109-
public function testPasswordIsRequired(): void
110-
{
111-
$this->browser()
112-
->throwExceptions()
113-
->visit('/register')
114-
->assertSuccessful()
115-
->fillField('Name', 'Madison')
116-
->fillField('Email', 'madison@example.com')
117-
->click('Register')
118-
->assertOn('/register')
119-
->assertSee('Please enter a password')
120-
->assertNotAuthenticated()
121-
;
122-
}
123-
124-
public function testPasswordMustBeMinLength(): void
125-
{
126-
$this->browser()
127-
->throwExceptions()
128-
->visit('/register')
129-
->assertSuccessful()
130-
->fillField('Name', 'Madison')
131-
->fillField('Email', 'madison@example.com')
132-
->fillField('Password', '1234')
133-
->click('Register')
134-
->assertOn('/register')
135-
->assertSee('Your password should be at least 6 characters')
136-
->assertNotAuthenticated()
137-
;
138-
}
13993
}

src/Resources/scaffolds/6.0/reset-password/src/Factory/ResetPasswordRequestFactory.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)