Skip to content

Commit

Permalink
tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-stanek committed Oct 20, 2023
1 parent 095d67b commit 5e21d91
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
6 changes: 5 additions & 1 deletion tests/integration/Services/stubs/TranslatorStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5e21d91

Please sign in to comment.