File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
fixtures/make-reset-password/tests Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Bundle \MakerBundle \Maker ;
1313
14- use Doctrine \Common \Annotations \Annotation ;
1514use Doctrine \ORM \EntityManagerInterface ;
1615use PhpParser \Builder \Param ;
1716use Symfony \Bridge \Twig \AppVariable ;
@@ -122,8 +121,6 @@ public function configureDependencies(DependencyBuilder $dependencies): void
122121
123122 ORMDependencyBuilder::buildDependencies ($ dependencies );
124123
125- $ dependencies ->addClassDependency (Annotation::class, 'annotations ' );
126-
127124 // reset-password-bundle 1.6 includes the ability to generate a fake token.
128125 // we need to check that version 1.6 is installed
129126 if (class_exists (ResetPasswordHelper::class) && !method_exists (ResetPasswordHelper::class, 'generateFakeResetToken ' )) {
Original file line number Diff line number Diff line change @@ -77,6 +77,11 @@ public function getTestDetails(): \Generator
7777 'tests/ResetPasswordFunctionalTest.php '
7878 );
7979
80+ if (60000 > $ runner ->getSymfonyVersion ()) {
81+ // @legacy - In 5.4 tests, we need to tell Symfony to look for the route attributes in `src/Controller`
82+ $ runner ->copy ('router-annotations.yaml ' , 'config/routes/annotations.yaml ' );
83+ }
84+
8085 $ runner ->runTests ();
8186 }),
8287 ];
Original file line number Diff line number Diff line change 66
77class ResetPasswordFunctionalTest extends WebTestCase
88{
9- public function testResetRequestRoute ()
9+ public function testResetRequestRoute (): void
1010 {
1111 $ client = static ::createClient ();
1212 $ client ->request ('GET ' , '/reset-password ' );
1313
1414 self ::assertSame (200 , $ client ->getResponse ()->getStatusCode ());
1515 }
1616
17- public function testResetRequestRouteDeniesInvalidToken ()
17+ public function testResetRequestRouteDeniesInvalidToken (): void
1818 {
1919 $ client = static ::createClient ();
2020 $ client ->request ('GET ' , '/reset-password/reset/badToken1234 ' );
2121
2222 self ::assertSame (302 , $ client ->getResponse ()->getStatusCode ());
2323 }
2424
25- public function testCheckEmailPageIsAlwaysAccessible ()
25+ public function testCheckEmailPageIsAlwaysAccessible (): void
2626 {
2727 $ client = static ::createClient ();
2828 $ client ->request ('GET ' , '/reset-password/check-email ' );
You can’t perform that action at this time.
0 commit comments