Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
6eb07948d4
commit
da99906fcc
|
|
@ -35,6 +35,7 @@ use OCP\AppFramework\Http\RedirectResponse;
|
||||||
use OCP\AppFramework\Http\RedirectToDefaultAppResponse;
|
use OCP\AppFramework\Http\RedirectToDefaultAppResponse;
|
||||||
use OCP\AppFramework\Http\StandaloneTemplateResponse;
|
use OCP\AppFramework\Http\StandaloneTemplateResponse;
|
||||||
use OCP\AppFramework\Http\TemplateResponse;
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
|
use OCP\EventDispatcher\IEventDispatcher;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use OCP\IL10N;
|
use OCP\IL10N;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
@ -59,6 +60,8 @@ class RegisterControllerTest extends TestCase {
|
||||||
private $loginFlowService;
|
private $loginFlowService;
|
||||||
/** @var MailService|MockObject */
|
/** @var MailService|MockObject */
|
||||||
private $mailService;
|
private $mailService;
|
||||||
|
/** @var IEventDispatcher|MockObject */
|
||||||
|
private $eventDispatcher;
|
||||||
|
|
||||||
public function setUp(): void {
|
public function setUp(): void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
@ -69,6 +72,7 @@ class RegisterControllerTest extends TestCase {
|
||||||
$this->registrationService = $this->createMock(RegistrationService::class);
|
$this->registrationService = $this->createMock(RegistrationService::class);
|
||||||
$this->loginFlowService = $this->createMock(LoginFlowService::class);
|
$this->loginFlowService = $this->createMock(LoginFlowService::class);
|
||||||
$this->mailService = $this->createMock(MailService::class);
|
$this->mailService = $this->createMock(MailService::class);
|
||||||
|
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
|
||||||
|
|
||||||
$this->l10n->expects($this->any())
|
$this->l10n->expects($this->any())
|
||||||
->method('t')
|
->method('t')
|
||||||
|
|
@ -91,7 +95,8 @@ class RegisterControllerTest extends TestCase {
|
||||||
$this->config,
|
$this->config,
|
||||||
$this->registrationService,
|
$this->registrationService,
|
||||||
$this->loginFlowService,
|
$this->loginFlowService,
|
||||||
$this->mailService
|
$this->mailService,
|
||||||
|
$this->eventDispatcher
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -106,6 +111,7 @@ class RegisterControllerTest extends TestCase {
|
||||||
$this->registrationService,
|
$this->registrationService,
|
||||||
$this->loginFlowService,
|
$this->loginFlowService,
|
||||||
$this->mailService,
|
$this->mailService,
|
||||||
|
$this->eventDispatcher,
|
||||||
])
|
])
|
||||||
->getMock();
|
->getMock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue