mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[AddressingBundle] Fix compatibility with Symfony 5
This commit is contained in:
parent
333c4e278c
commit
db4d4f8004
2 changed files with 18 additions and 8 deletions
16
src/Sylius/Bundle/AddressingBundle/.gitignore
vendored
16
src/Sylius/Bundle/AddressingBundle/.gitignore
vendored
|
|
@ -1,8 +1,12 @@
|
|||
vendor/
|
||||
bin/
|
||||
/vendor/
|
||||
/bin/
|
||||
|
||||
composer.phar
|
||||
composer.lock
|
||||
/composer.phar
|
||||
/composer.lock
|
||||
|
||||
test/app/cache
|
||||
test/app/logs
|
||||
/test/app/cache
|
||||
/test/app/logs
|
||||
/test/var/cache
|
||||
/test/var/logs
|
||||
|
||||
/.phpunit.result.cache
|
||||
|
|
|
|||
|
|
@ -110,7 +110,11 @@ final class CountryChoiceTypeTest extends TypeTestCase
|
|||
$this->poland->reveal(),
|
||||
]);
|
||||
|
||||
$this->assertChoicesLabels(['Poland'], ['choice_filter' => function (CountryInterface $country): bool {
|
||||
$this->assertChoicesLabels(['Poland'], ['choice_filter' => static function (?CountryInterface $country): bool {
|
||||
if ($country === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $country->getName() === 'Poland';
|
||||
}]);
|
||||
}
|
||||
|
|
@ -120,7 +124,9 @@ final class CountryChoiceTypeTest extends TypeTestCase
|
|||
$form = $this->factory->create(CountryChoiceType::class, null, $formConfiguration);
|
||||
$view = $form->createView();
|
||||
|
||||
Assert::assertSame($expectedLabels, array_map(function (ChoiceView $choiceView): string {
|
||||
$i = 1;
|
||||
|
||||
Assert::assertSame($expectedLabels, array_map(static function (ChoiceView $choiceView): string {
|
||||
return $choiceView->label;
|
||||
}, $view->vars['choices']));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue