Some random tests and fixes (#6000)

* added tests for form models
* apply form theme only to the own custom form type
* change route order for improves matching
This commit is contained in:
Kevin Papst
2026-06-17 10:20:50 +02:00
committed by GitHub
parent f8bc853d2f
commit 8bf711c417
11 changed files with 403 additions and 32 deletions

View File

@@ -156,8 +156,10 @@ final class Configuration
return $this->formTheme;
}
public function setFormTheme(string $formTheme): void
public function setFormTheme(string $formTheme): Configuration
{
$this->formTheme = $formTheme;
return $this;
}
}

View File

@@ -51,7 +51,7 @@ final class MultiUserTimesheet extends Timesheet
public function removeUser(User $user): void
{
if ($this->users->contains($user)) {
$this->users->remove($user);
$this->users->removeElement($user);
}
}
@@ -71,7 +71,7 @@ final class MultiUserTimesheet extends Timesheet
public function removeTeam(Team $team): void
{
if ($this->teams->contains($team)) {
$this->teams->remove($team);
$this->teams->removeElement($team);
}
}
}

View File

@@ -15,7 +15,7 @@ final class TotpActivation
{
private ?string $code = null;
public function __construct(private User $user)
public function __construct(private readonly User $user)
{
}