Skip to content

Commit 3649444

Browse files
committed
add reset password maker test
1 parent 5254b55 commit 3649444

File tree

5 files changed

+85
-0
lines changed

5 files changed

+85
-0
lines changed

tests/Maker/MakeResetPasswordTest.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Bundle\MakerBundle\Tests\Maker;
13+
14+
use Symfony\Bundle\MakerBundle\Maker\MakeResetPassword;
15+
use Symfony\Bundle\MakerBundle\Test\MakerTestCase;
16+
use Symfony\Bundle\MakerBundle\Test\MakerTestDetails;
17+
18+
class MakeResetPasswordTest extends MakerTestCase
19+
{
20+
public function getTestDetails()
21+
{
22+
yield 'reset_password' => [MakerTestDetails::createTest(
23+
$this->getMakerInstance(MakeResetPassword::class),
24+
[
25+
26+
'SymfonyCasts',
27+
'App\Entity\User',
28+
'app_home',
29+
])
30+
->setFixtureFilesPath(__DIR__.'/../fixtures/MakeResetPassword'),
31+
];
32+
}
33+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
return [
4+
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
5+
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
6+
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
7+
SymfonyCasts\Bundle\ResetPassword\SymfonyCastsResetPasswordBundle::class => ['all' => true],
8+
];
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
symfonycasts_reset_password:
2+
request_password_repository: SymfonyCasts\Bundle\ResetPassword\Persistence\Fake\FakeResetPasswordInternalRepository
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
security:
2+
encoders:
3+
App\Entity\User: bcrypt
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
namespace App\Entity;
4+
5+
use Symfony\Component\Security\Core\User\UserInterface;
6+
7+
class User implements UserInterface
8+
{
9+
10+
private $email;
11+
12+
public function getEmail()
13+
{
14+
}
15+
16+
public function getRoles()
17+
{
18+
}
19+
20+
public function getPassword()
21+
{
22+
}
23+
24+
public function setPassword()
25+
{
26+
}
27+
28+
public function getSalt()
29+
{
30+
}
31+
32+
public function getUsername()
33+
{
34+
}
35+
36+
public function eraseCredentials()
37+
{
38+
}
39+
}

0 commit comments

Comments
 (0)