Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
webda2l committed Jan 3, 2024
1 parent f835a7d commit b1fff14
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
6 changes: 3 additions & 3 deletions tests/Fixtures/Entity/MediaLocalize.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Fixtures/Entity/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions tests/Fixtures/Entity/ProductTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 1 addition & 3 deletions tests/Form/Type/TranslationsTypeSimpleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit b1fff14

Please sign in to comment.