Fix broken tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
e9a58f8579
commit
0326c2c54f
2 changed files with 7 additions and 1 deletions
|
@ -74,6 +74,7 @@ class LoginController extends Controller {
|
||||||
* @param IURLGenerator $urlGenerator
|
* @param IURLGenerator $urlGenerator
|
||||||
* @param ILogger $logger
|
* @param ILogger $logger
|
||||||
* @param Manager $twoFactorManager
|
* @param Manager $twoFactorManager
|
||||||
|
* @param Defaults $defaults
|
||||||
*/
|
*/
|
||||||
public function __construct($appName,
|
public function __construct($appName,
|
||||||
IRequest $request,
|
IRequest $request,
|
||||||
|
|
|
@ -26,6 +26,7 @@ use OC\Core\Controller\LoginController;
|
||||||
use OC\User\Session;
|
use OC\User\Session;
|
||||||
use OCP\AppFramework\Http\RedirectResponse;
|
use OCP\AppFramework\Http\RedirectResponse;
|
||||||
use OCP\AppFramework\Http\TemplateResponse;
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
|
use OCP\Defaults;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use OCP\ILogger;
|
use OCP\ILogger;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
@ -54,6 +55,8 @@ class LoginControllerTest extends TestCase {
|
||||||
private $logger;
|
private $logger;
|
||||||
/** @var Manager|\PHPUnit_Framework_MockObject_MockObject */
|
/** @var Manager|\PHPUnit_Framework_MockObject_MockObject */
|
||||||
private $twoFactorManager;
|
private $twoFactorManager;
|
||||||
|
/** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */
|
||||||
|
private $defaults;
|
||||||
|
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
@ -65,6 +68,7 @@ class LoginControllerTest extends TestCase {
|
||||||
$this->urlGenerator = $this->createMock(IURLGenerator::class);
|
$this->urlGenerator = $this->createMock(IURLGenerator::class);
|
||||||
$this->logger = $this->createMock(ILogger::class);
|
$this->logger = $this->createMock(ILogger::class);
|
||||||
$this->twoFactorManager = $this->createMock(Manager::class);
|
$this->twoFactorManager = $this->createMock(Manager::class);
|
||||||
|
$this->defaults = $this->createMock(Defaults::class);
|
||||||
|
|
||||||
$this->loginController = new LoginController(
|
$this->loginController = new LoginController(
|
||||||
'core',
|
'core',
|
||||||
|
@ -75,7 +79,8 @@ class LoginControllerTest extends TestCase {
|
||||||
$this->userSession,
|
$this->userSession,
|
||||||
$this->urlGenerator,
|
$this->urlGenerator,
|
||||||
$this->logger,
|
$this->logger,
|
||||||
$this->twoFactorManager
|
$this->twoFactorManager,
|
||||||
|
$this->defaults
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue