55use EWZ \Bundle \RecaptchaBundle \Form \Type \EWZRecaptchaType ;
66use EWZ \Bundle \RecaptchaBundle \Locale \LocaleResolver ;
77use PHPUnit \Framework \TestCase ;
8+ use Symfony \Component \Form \Extension \Core \Type \TextType ;
9+ use Symfony \Component \Form \FormInterface ;
810use Symfony \Component \Form \FormView ;
11+ use Symfony \Component \HttpFoundation \RequestStack ;
912use Symfony \Component \OptionsResolver \OptionsResolver ;
1013
1114class EWZRecaptchaTypeTest extends TestCase
@@ -15,7 +18,7 @@ class EWZRecaptchaTypeTest extends TestCase
1518
1619 protected function setUp ()
1720 {
18- $ requestStack = $ this ->createMock (' Symfony\Component\HttpFoundation\ RequestStack' );
21+ $ requestStack = $ this ->createMock (RequestStack::class );
1922 $ localeResolver = new LocaleResolver ('de ' , false , $ requestStack );
2023 $ this ->type = new EWZRecaptchaType ('key ' , true , true , $ localeResolver , 'www.google.com ' );
2124 }
@@ -27,7 +30,8 @@ public function buildView()
2730 {
2831 $ view = new FormView ();
2932
30- $ form = $ this ->createMock ('Symfony\Component\Form\FormInterface ' );
33+ /** @var FormInterface $form */
34+ $ form = $ this ->createMock (FormInterface::class);
3135
3236 $ this ->assertArrayNotHasKey ('ewz_recaptcha_enabled ' , $ view ->vars );
3337 $ this ->assertArrayNotHasKey ('ewz_recaptcha_ajax ' , $ view ->vars );
@@ -43,7 +47,7 @@ public function buildView()
4347 */
4448 public function getParent ()
4549 {
46- $ this ->assertSame (' Symfony\Component\Form\Extension\Core\Type\ TextType' , $ this ->type ->getParent ());
50+ $ this ->assertSame (TextType::class , $ this ->type ->getParent ());
4751 }
4852
4953 /**
0 commit comments