template->setParams(new ForgotPasswordParams('mock-username', 'mock-code', 'mock-link')); $params = $this->template->getParams(); $this->assertSame('mock-username', $params['username']); $this->assertSame('mock-code', $params['code']); $this->assertSame('mock-link', $params['link']); } public function testInvalidCallOfParams(): void { $this->expectException(InvalidCallException::class); $this->template->getParams(); } protected function _before() { parent::_before(); /** @var MailerInterface|\PHPUnit\Framework\MockObject\MockObject $mailer */ $mailer = $this->createMock(MailerInterface::class); /** @var RendererInterface|\PHPUnit\Framework\MockObject\MockObject $renderer */ $renderer = $this->createMock(RendererInterface::class); $this->template = new ForgotPasswordEmail($mailer, $renderer); } }