[TESTS] Add coverage ignore to TemplateController and ResetPassword (as it requires sending emails)

This commit is contained in:
Hugo Sales 2021-08-03 10:14:11 +00:00
parent 518995d155
commit 8139a21eb9
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
2 changed files with 12 additions and 1 deletions

View File

@ -11,6 +11,12 @@ use Symfony\Component\Validator\Constraints\NotBlank;
use SymfonyCasts\Bundle\ResetPassword\Controller\ResetPasswordControllerTrait; use SymfonyCasts\Bundle\ResetPassword\Controller\ResetPasswordControllerTrait;
use SymfonyCasts\Bundle\ResetPassword\Exception\ResetPasswordExceptionInterface; use SymfonyCasts\Bundle\ResetPassword\Exception\ResetPasswordExceptionInterface;
/**
* Send password reset emails to users
* TODO: As we don't have email services setup yet, this won't be tested right now
*
* @codeCoverageIgnore
*/
class ResetPassword extends Controller class ResetPassword extends Controller
{ {
use ResetPasswordControllerTrait; use ResetPasswordControllerTrait;
@ -78,7 +84,7 @@ class ResetPassword extends Controller
// The token is valid; allow the user to change their password. // The token is valid; allow the user to change their password.
$form = From::create([ $form = From::create([
FormFields::password(), FormFields::repeated_password(),
['password_reset', SubmitType::class, ['label' => _m('Change password')]], ['password_reset', SubmitType::class, ['label' => _m('Change password')]],
]); ]);

View File

@ -22,6 +22,11 @@ namespace App\Controller;
use App\Core\Controller; use App\Core\Controller;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/**
* Can be used to implement static routes that simply require rendering a Twig template
*
* @codeCoverageIgnore
*/
class TemplateController extends Controller class TemplateController extends Controller
{ {
public function handle(Request $req) public function handle(Request $req)