Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ Enable Deprecation Helper in Tests #701

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<env name="APP_DEBUG" value="1"/>
<env name="APP_SECRET" value="s$cretf0rt3st"/>
<env name="SHELL_VERBOSITY" value="-1"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0"/>
<!-- define your env variables for the test env here -->
</php>
<testsuites>
Expand Down
6 changes: 3 additions & 3 deletions src/Form/AliasDeleteType.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AliasDeleteType extends AbstractType
{
public const NAME = 'delete_alias';

public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder, array $options) : void
{
$builder
->add('password', PasswordType::class, ['label' => 'form.delete-password'])
Expand All @@ -22,15 +22,15 @@ public function buildForm(FormBuilderInterface $builder, array $options)
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver) : void
{
$resolver->setDefaults(['data_class' => 'App\Form\Model\Delete']);
}

/**
* @return string
*/
public function getBlockPrefix()
public function getBlockPrefix() : string
{
return self::NAME;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/CustomAliasCreateType.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CustomAliasCreateType extends AbstractType
{
public const NAME = 'create_custom_alias';

public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder, array $options) : void
{
$builder
->add('alias', TextType::class, ['label' => 'form.new-custom-alias'])
Expand All @@ -22,15 +22,15 @@ public function buildForm(FormBuilderInterface $builder, array $options)
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver) : void
{
$resolver->setDefaults(['data_class' => 'App\Form\Model\AliasCreate']);
}

/**
* @return string
*/
public function getBlockPrefix()
public function getBlockPrefix() : string
{
return self::NAME;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Form/OpenPgpDeleteType.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class OpenPgpDeleteType extends AbstractType
{
public const NAME = 'delete_openpgp';

public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder, array $options) : void
{
$builder
->add('password', PasswordType::class, ['label' => 'form.delete-password'])
Expand All @@ -22,15 +22,15 @@ public function buildForm(FormBuilderInterface $builder, array $options)
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver) : void
{
$resolver->setDefaults(['data_class' => 'App\Form\Model\Delete']);
}

/**
* @return string
*/
public function getBlockPrefix()
public function getBlockPrefix() : string
{
return self::NAME;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Form/RegistrationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(EntityManagerInterface $manager)
$this->domain = $manager->getRepository(Domain::class)->getDefaultDomain()->getName();
}

public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder, array $options) : void
{
$transformer = new TextToEmailTransformer($this->domain);

Expand Down
9 changes: 0 additions & 9 deletions tests/EntityListener/UserChangedListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ public function setUp(): void
->willReturn($this->voucherRepository);
$this->suspiciousChildrenHandler = $this->createMock(SuspiciousChildrenHandler::class);
$this->listener = new UserChangedListener($manager, $this->suspiciousChildrenHandler);

$this->session = $this->createMock(Session::class);
$this->request = $this->createMock(Request::class);
$this->request->method('getSession')
->willReturn($this->session);
$this->request->query = new InputBag();
$this->event = $this->createMock(RequestEvent::class);
$this->event->method('getRequest')
->willReturn($this->request);
}

public function testPreUpdateNoRoleChanges(): void
Expand Down
Loading