Fix unit tests

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2021-04-13 16:04:56 +02:00
parent 6eb07948d4
commit da99906fcc
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 7 additions and 1 deletions

View File

@ -35,6 +35,7 @@ use OCP\AppFramework\Http\RedirectResponse;
use OCP\AppFramework\Http\RedirectToDefaultAppResponse;
use OCP\AppFramework\Http\StandaloneTemplateResponse;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IRequest;
@ -59,6 +60,8 @@ class RegisterControllerTest extends TestCase {
private $loginFlowService;
/** @var MailService|MockObject */
private $mailService;
/** @var IEventDispatcher|MockObject */
private $eventDispatcher;
public function setUp(): void {
parent::setUp();
@ -69,6 +72,7 @@ class RegisterControllerTest extends TestCase {
$this->registrationService = $this->createMock(RegistrationService::class);
$this->loginFlowService = $this->createMock(LoginFlowService::class);
$this->mailService = $this->createMock(MailService::class);
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
$this->l10n->expects($this->any())
->method('t')
@ -91,7 +95,8 @@ class RegisterControllerTest extends TestCase {
$this->config,
$this->registrationService,
$this->loginFlowService,
$this->mailService
$this->mailService,
$this->eventDispatcher
);
}
@ -106,6 +111,7 @@ class RegisterControllerTest extends TestCase {
$this->registrationService,
$this->loginFlowService,
$this->mailService,
$this->eventDispatcher,
])
->getMock();
}