From b1fff149574202159c880f6c11db57d18371caa5 Mon Sep 17 00:00:00 2001 From: David ALLIX Date: Wed, 3 Jan 2024 12:23:34 +0100 Subject: [PATCH] Fix --- tests/Fixtures/Entity/MediaLocalize.php | 6 +++--- tests/Fixtures/Entity/Product.php | 6 +++--- tests/Fixtures/Entity/ProductTranslation.php | 6 +++--- tests/Form/Type/TranslationsTypeSimpleTest.php | 4 +--- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/tests/Fixtures/Entity/MediaLocalize.php b/tests/Fixtures/Entity/MediaLocalize.php index 45fcd44..abe18b6 100644 --- a/tests/Fixtures/Entity/MediaLocalize.php +++ b/tests/Fixtures/Entity/MediaLocalize.php @@ -24,16 +24,16 @@ class MediaLocalize private ?int $id = null; #[ORM\Column(length: 10)] - private ?string $locale; + private ?string $locale = null; #[ORM\ManyToOne(targetEntity: Product::class, inversedBy: 'medias')] private Product $product; #[ORM\Column(nullable: true)] - private ?string $url; + private ?string $url = null; #[ORM\Column(nullable: true)] - private ?string $description; + private ?string $description = null; public function getId(): ?int { diff --git a/tests/Fixtures/Entity/Product.php b/tests/Fixtures/Entity/Product.php index 209339d..c78c7f0 100644 --- a/tests/Fixtures/Entity/Product.php +++ b/tests/Fixtures/Entity/Product.php @@ -26,13 +26,13 @@ class Product private ?int $id = null; #[ORM\Column(nullable: true)] - private ?string $title; + private ?string $title = null; #[ORM\Column(type: 'text', nullable: true)] - private ?string $description; + private ?string $description = null; #[ORM\Column(nullable: true)] - private ?string $url; + private ?string $url = null; #[ORM\OneToMany(targetEntity: MediaLocalize::class, mappedBy: 'product', indexBy: 'locale', cascade: ['all'], orphanRemoval: true)] private ArrayCollection $medias; diff --git a/tests/Fixtures/Entity/ProductTranslation.php b/tests/Fixtures/Entity/ProductTranslation.php index 5c280fc..aecdd58 100644 --- a/tests/Fixtures/Entity/ProductTranslation.php +++ b/tests/Fixtures/Entity/ProductTranslation.php @@ -26,13 +26,13 @@ class ProductTranslation private ?int $id = null; #[ORM\Column(length: 10)] - private ?string $locale; + private ?string $locale = null; #[ORM\Column(nullable: true)] - private ?string $title; + private ?string $title = null; #[ORM\Column(type: 'text', nullable: true)] - private ?string $description; + private ?string $description = null; #[ORM\ManyToOne(targetEntity: Product::class, inversedBy: 'translations')] #[ORM\JoinColumn(name: 'translatable_id', referencedColumnName: 'id', onDelete: 'CASCADE', nullable: false)] diff --git a/tests/Form/Type/TranslationsTypeSimpleTest.php b/tests/Form/Type/TranslationsTypeSimpleTest.php index 2a2c54a..63b480a 100644 --- a/tests/Form/Type/TranslationsTypeSimpleTest.php +++ b/tests/Form/Type/TranslationsTypeSimpleTest.php @@ -110,10 +110,8 @@ public function testCreationForm(): Product /** * @depends testCreationForm - * - * @param mixed $product */ - public function testEditionForm($product): void + public function testEditionForm(Product $product): void { $product->getTranslations()['en']->setDescription('desc ennnnnnn'); $product->getTranslations()['fr']->setTitle('title frrrrrr');