-
-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #1059 [make:reset-password] Translate exception reasons provi…
…ded by ResetPasswordBundle (bocharsky-bw) This PR was squashed before being merged into the 1.0-dev branch. Discussion ---------- [make:reset-password] Translate exception reasons provided by ResetPasswordBundle If there's `Symfony\Contracts\Translation\TranslatorInterface` service available in the project - Maker will generate a slightly different controller's code to inject translator service and translate exception reasons out of the box. Available after: SymfonyCasts/reset-password-bundle#206 Commits ------- b771178 [make:reset-password] Translate exception reasons provided by ResetPasswordBundle
- Loading branch information
Showing
3 changed files
with
44 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,22 @@ public function getTestDetails() | |
}), | ||
]; | ||
|
||
yield 'it_generates_with_translator_installed' => [$this->createResetPasswordTest() | ||
->addExtraDependencies('symfony/translation') | ||
->run(function (MakerTestRunner $runner) { | ||
$this->makeUser($runner); | ||
|
||
$output = $runner->runMaker([ | ||
'App\Entity\User', | ||
'app_home', | ||
'[email protected]', | ||
'SymfonyCasts', | ||
]); | ||
|
||
$this->assertStringContainsString('Success', $output); | ||
}), | ||
]; | ||
|
||
yield 'it_generates_with_custom_config' => [$this->createResetPasswordTest() | ||
->run(function (MakerTestRunner $runner) { | ||
$runner->deleteFile('config/packages/reset_password.yaml'); | ||
|