-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from coopTilleuls/chore/php-8
- Loading branch information
Showing
14 changed files
with
285 additions
and
458 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ | |
use CoopTilleuls\ForgotPasswordBundle\Controller\ResetPassword; | ||
use CoopTilleuls\ForgotPasswordBundle\Manager\ForgotPasswordManager; | ||
use CoopTilleuls\ForgotPasswordBundle\Provider\ProviderInterface; | ||
use CoopTilleuls\ForgotPasswordBundle\Tests\ProphecyTrait; | ||
use PHPUnit\Framework\TestCase; | ||
use Prophecy\Prophecy\ObjectProphecy; | ||
use Symfony\Component\HttpFoundation\Response; | ||
|
@@ -26,8 +25,6 @@ | |
*/ | ||
final class ResetPasswordTest extends TestCase | ||
{ | ||
use ProphecyTrait; | ||
|
||
/** | ||
* @var ProviderInterface|ObjectProphecy | ||
*/ | ||
|
@@ -39,15 +36,15 @@ final class ResetPasswordTest extends TestCase | |
|
||
protected function setUp(): void | ||
{ | ||
$this->providerMock = $this->prophesize(ProviderInterface::class); | ||
$this->managerMock = $this->prophesize(ForgotPasswordManager::class); | ||
$this->providerMock = $this->createMock(ProviderInterface::class); | ||
$this->managerMock = $this->createMock(ForgotPasswordManager::class); | ||
} | ||
|
||
public function testResetPasswordAction(): void | ||
{ | ||
$this->managerMock->resetPassword('email', '[email protected]', $this->providerMock)->shouldBeCalledOnce(); | ||
$controller = new ResetPassword($this->managerMock->reveal()); | ||
$response = $controller('email', '[email protected]', $this->providerMock->reveal()); | ||
$this->managerMock->expects($this->once())->method('resetPassword')->with('email', '[email protected]', $this->providerMock); | ||
$controller = new ResetPassword($this->managerMock); | ||
$response = $controller('email', '[email protected]', $this->providerMock); | ||
$this->assertInstanceOf(Response::class, $response); | ||
$this->assertEquals('', $response->getContent()); | ||
$this->assertEquals(204, $response->getStatusCode()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.