diff --git a/tests/DependentFieldConfigTest.php b/tests/DependentFieldConfigTest.php index 3d9f9eb..9978363 100644 --- a/tests/DependentFieldConfigTest.php +++ b/tests/DependentFieldConfigTest.php @@ -1,5 +1,12 @@ + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfonycasts\DynamicForms\Tests; use PHPUnit\Framework\TestCase; diff --git a/tests/FunctionalTest.php b/tests/FunctionalTest.php index 2321160..6f065ee 100644 --- a/tests/FunctionalTest.php +++ b/tests/FunctionalTest.php @@ -1,5 +1,12 @@ + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfonycasts\DynamicForms\Tests; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; @@ -75,7 +82,6 @@ public function testDynamicFields() ; } - protected static function getKernelClass(): string { return DynamicFormsTestKernel::class; diff --git a/tests/fixtures/DynamicFormsTestKernel.php b/tests/fixtures/DynamicFormsTestKernel.php index f4877ad..ae997f2 100644 --- a/tests/fixtures/DynamicFormsTestKernel.php +++ b/tests/fixtures/DynamicFormsTestKernel.php @@ -1,5 +1,12 @@ + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfonycasts\DynamicForms\Tests\fixtures; use Psr\Log\NullLogger; diff --git a/tests/fixtures/Enum/DynamicTestFood.php b/tests/fixtures/Enum/DynamicTestFood.php index 0a66197..ad41e57 100644 --- a/tests/fixtures/Enum/DynamicTestFood.php +++ b/tests/fixtures/Enum/DynamicTestFood.php @@ -1,5 +1,12 @@ + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfonycasts\DynamicForms\Tests\fixtures\Enum; enum DynamicTestFood: string diff --git a/tests/fixtures/Enum/DynamicTestMeal.php b/tests/fixtures/Enum/DynamicTestMeal.php index 754a164..34b5cb1 100644 --- a/tests/fixtures/Enum/DynamicTestMeal.php +++ b/tests/fixtures/Enum/DynamicTestMeal.php @@ -1,5 +1,12 @@ + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfonycasts\DynamicForms\Tests\fixtures\Enum; enum DynamicTestMeal: string diff --git a/tests/fixtures/Enum/DynamicTestPizzaSize.php b/tests/fixtures/Enum/DynamicTestPizzaSize.php index 391b463..b092f65 100644 --- a/tests/fixtures/Enum/DynamicTestPizzaSize.php +++ b/tests/fixtures/Enum/DynamicTestPizzaSize.php @@ -1,5 +1,12 @@ + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfonycasts\DynamicForms\Tests\fixtures\Enum; enum DynamicTestPizzaSize: int diff --git a/tests/fixtures/TestDynamicForm.php b/tests/fixtures/TestDynamicForm.php index fb32774..01710a8 100644 --- a/tests/fixtures/TestDynamicForm.php +++ b/tests/fixtures/TestDynamicForm.php @@ -1,5 +1,12 @@ + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfonycasts\DynamicForms\Tests\fixtures; use Symfony\Component\Form\AbstractType; @@ -29,7 +36,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); // addDynamic(string $name, array $dependencies, callable $callback): self - $builder->addDependent('mainFood', ['meal'], function(DependentField $field, ?DynamicTestMeal $meal) { + $builder->addDependent('mainFood', ['meal'], function (DependentField $field, ?DynamicTestMeal $meal) { $field->add(EnumType::class, [ 'class' => DynamicTestFood::class, 'placeholder' => null === $meal ? 'Select a meal first' : sprintf('What is for %s?', $meal->getReadable()), @@ -39,7 +46,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); }); - $builder->addDependent('pizzaSize', ['mainFood', 'upperCasePizzaSizes'], function(DependentField $field, ?DynamicTestFood $food, bool $upperCasePizzaSizes) { + $builder->addDependent('pizzaSize', ['mainFood', 'upperCasePizzaSizes'], function (DependentField $field, ?DynamicTestFood $food, bool $upperCasePizzaSizes) { if (DynamicTestFood::Pizza !== $food) { return; }