template->setKey('mock-key'); $params = $this->template->getParams(); $this->assertSame('mock-key', $params['key']); } public function testInvalidCallOfParams(): void { $this->expectException(InvalidCallException::class); $this->template->getParams(); } protected function _before(): void { parent::_before(); /** @var MailerInterface|\PHPUnit\Framework\MockObject\MockObject $mailer */ $mailer = $this->createMock(MailerInterface::class); $this->template = new ChangeEmail($mailer); } }