mirror of https://github.com/nextcloud/contacts
Fix tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
111346e29d
commit
014d0ced64
|
@ -34,25 +34,26 @@ class PageController extends Controller {
|
||||||
|
|
||||||
protected $appName;
|
protected $appName;
|
||||||
|
|
||||||
// /** @var IInitialStateService */
|
|
||||||
// private $initialStateService;
|
|
||||||
|
|
||||||
/** @var IFactory */
|
|
||||||
private $languageFactory;
|
|
||||||
/** @var IConfig */
|
/** @var IConfig */
|
||||||
private $config;
|
private $config;
|
||||||
|
|
||||||
public function __construct(string $AppName,
|
/** @var IInitialStateService */
|
||||||
|
private $initialStateService;
|
||||||
|
|
||||||
|
/** @var IFactory */
|
||||||
|
private $languageFactory;
|
||||||
|
|
||||||
|
public function __construct(string $appName,
|
||||||
IRequest $request,
|
IRequest $request,
|
||||||
IConfig $config,
|
IConfig $config,
|
||||||
IInitialStateService $initialStateService,
|
IInitialStateService $initialStateService,
|
||||||
IFactory $languageFactory) {
|
IFactory $languageFactory) {
|
||||||
parent::__construct($AppName, $request);
|
parent::__construct($appName, $request);
|
||||||
|
|
||||||
$this->appName = $AppName;
|
$this->appName = $appName;
|
||||||
|
$this->config = $config;
|
||||||
$this->initialStateService = $initialStateService;
|
$this->initialStateService = $initialStateService;
|
||||||
$this->languageFactory = $languageFactory;
|
$this->languageFactory = $languageFactory;
|
||||||
$this->config = $config;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace OCA\Contacts\Controller;
|
||||||
use OCP\AppFramework\Http\TemplateResponse;
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use PHPUnit\Framework\MockObject\MockObject;
|
use PHPUnit\Framework\MockObject\MockObject;
|
||||||
// use OCP\IInitialStateService;
|
use OCP\IInitialStateService;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
use OCP\L10N\IFactory;
|
use OCP\L10N\IFactory;
|
||||||
use ChristophWurst\Nextcloud\Testing\TestCase;
|
use ChristophWurst\Nextcloud\Testing\TestCase;
|
||||||
|
@ -39,11 +39,12 @@ class PageControllerTest extends TestCase {
|
||||||
/** @var IRequest|MockObject */
|
/** @var IRequest|MockObject */
|
||||||
private $request;
|
private $request;
|
||||||
|
|
||||||
// /** @var IInitialStateService|MockObject */
|
/** @var IInitialStateService|MockObject */
|
||||||
// private $initialStateService;
|
private $initialStateService;
|
||||||
|
|
||||||
/** @var IFactory|MockObject */
|
/** @var IFactory|MockObject */
|
||||||
private $languageFactory;
|
private $languageFactory;
|
||||||
|
|
||||||
/** @var IConfig|MockObject*/
|
/** @var IConfig|MockObject*/
|
||||||
private $config;
|
private $config;
|
||||||
|
|
||||||
|
@ -52,15 +53,15 @@ class PageControllerTest extends TestCase {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->request = $this->createMock(IRequest::class);
|
$this->request = $this->createMock(IRequest::class);
|
||||||
// $this->initialStateService = $this->createMock(IInitialStateService::class);
|
$this->initialStateService = $this->createMock(IInitialStateService::class);
|
||||||
$this->languageFactory = $this->createMock(IFactory::class);
|
$this->languageFactory = $this->createMock(IFactory::class);
|
||||||
$this->config = $this->createMock(IConfig::class);
|
$this->config = $this->createMock(IConfig::class);
|
||||||
|
|
||||||
$this->controller = new PageController(
|
$this->controller = new PageController(
|
||||||
'contacts',
|
'contacts',
|
||||||
$this->request,
|
$this->request,
|
||||||
// $this->initialStateService,
|
|
||||||
$this->config,
|
$this->config,
|
||||||
|
$this->initialStateService,
|
||||||
$this->languageFactory
|
$this->languageFactory
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue