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