add food vendor tests
All checks were successful
/ ls (pull_request) Successful in 28s
/ ls (push) Successful in 28s

This commit is contained in:
lubiana 2024-06-14 20:21:16 +02:00
parent 63bf367ab0
commit a7bec45c48
No known key found for this signature in database
8 changed files with 39 additions and 53 deletions

View file

@ -20,9 +20,6 @@ class FoodOrder
#[ORM\CustomIdGenerator(class: UlidGenerator::class)]
private Ulid|null $id = null;
#[ORM\Column]
private DateTimeImmutable $createdAt;
#[ORM\Column(nullable: true)]
private DateTimeImmutable|null $closedAt = null;
@ -38,7 +35,6 @@ class FoodOrder
public function __construct()
{
$this->createdAt = new DateTimeImmutable;
$this->orderItems = new ArrayCollection;
}
@ -47,16 +43,9 @@ class FoodOrder
return $this->id;
}
public function getCreatedAt(): DateTimeImmutable|null
public function getCreatedAt(): DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(DateTimeImmutable $createdAt): static
{
$this->createdAt = $createdAt;
return $this;
return $this->id->getDateTime();
}
public function getClosedAt(): DateTimeImmutable|null