diff --git a/app/Model/Mailing/Commands/Handlers/CreateTemplateMailHandler.php b/app/Model/Mailing/Commands/Handlers/CreateTemplateMailHandler.php index aaf2f04c0..86ea4a267 100644 --- a/app/Model/Mailing/Commands/Handlers/CreateTemplateMailHandler.php +++ b/app/Model/Mailing/Commands/Handlers/CreateTemplateMailHandler.php @@ -16,8 +16,8 @@ use Doctrine\Common\Collections\Collection; use Doctrine\ORM\EntityManagerInterface; use Nette\Localization\Translator; - use Symfony\Component\Messenger\Handler\MessageHandlerInterface; + use function str_replace; use function strval; diff --git a/tests/integration/Program/Commands/SaveCategoryHandlerTest.php b/tests/integration/Program/Commands/SaveCategoryHandlerTest.php index c1befca01..5a30ba427 100644 --- a/tests/integration/Program/Commands/SaveCategoryHandlerTest.php +++ b/tests/integration/Program/Commands/SaveCategoryHandlerTest.php @@ -198,5 +198,6 @@ protected function _before(): void $this->settingsRepository->save(new Settings(Settings::SEMINAR_NAME, 'test')); TemplateFactory::createTemplate($this->templateRepository, Template::PROGRAM_REGISTERED); + TemplateFactory::createTemplate($this->templateRepository, Template::PROGRAM_UNREGISTERED); } } diff --git a/tests/integration/Services/stubs/TranslatorStub.php b/tests/integration/Services/stubs/TranslatorStub.php index 8c872e0e6..7f97fc18a 100644 --- a/tests/integration/Services/stubs/TranslatorStub.php +++ b/tests/integration/Services/stubs/TranslatorStub.php @@ -8,7 +8,11 @@ class TranslatorStub implements Translator { - function translate($message, ...$parameters): string + /** + * @param string $message + * @param mixed ...$parameters + */ + public function translate($message, ...$parameters): string { return $message; } diff --git a/tests/integration/User/Commands/UpdateUserProgramsHandlerTest.php b/tests/integration/User/Commands/UpdateUserProgramsHandlerTest.php index d7af03435..38704e8a8 100644 --- a/tests/integration/User/Commands/UpdateUserProgramsHandlerTest.php +++ b/tests/integration/User/Commands/UpdateUserProgramsHandlerTest.php @@ -11,6 +11,8 @@ use App\Model\Application\RolesApplication; use App\Model\Enums\ApplicationState; use App\Model\Enums\ProgramMandatoryType; +use App\Model\Mailing\Mail; +use App\Model\Mailing\MailQueue; use App\Model\Mailing\Repositories\TemplateRepository; use App\Model\Mailing\Template; use App\Model\Mailing\TemplateFactory; @@ -243,7 +245,7 @@ public function testUserRolesChanged(): void /** @return string[] */ protected function getTestedAggregateRoots(): array { - return [User::class, Settings::class]; + return [User::class, Settings::class, Mail::class, MailQueue::class, Template::class]; } protected function _before(): void