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;
|
||||
|
||||
// /** @var IInitialStateService */
|
||||
// private $initialStateService;
|
||||
|
||||
/** @var IFactory */
|
||||
private $languageFactory;
|
||||
/** @var IConfig */
|
||||
private $config;
|
||||
|
||||
public function __construct(string $AppName,
|
||||
/** @var IInitialStateService */
|
||||
private $initialStateService;
|
||||
|
||||
/** @var IFactory */
|
||||
private $languageFactory;
|
||||
|
||||
public function __construct(string $appName,
|
||||
IRequest $request,
|
||||
IConfig $config,
|
||||
IInitialStateService $initialStateService,
|
||||
IFactory $languageFactory) {
|
||||
parent::__construct($AppName, $request);
|
||||
parent::__construct($appName, $request);
|
||||
|
||||
$this->appName = $AppName;
|
||||
$this->appName = $appName;
|
||||
$this->config = $config;
|
||||
$this->initialStateService = $initialStateService;
|
||||
$this->languageFactory = $languageFactory;
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace OCA\Contacts\Controller;
|
|||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\IConfig;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
// use OCP\IInitialStateService;
|
||||
use OCP\IInitialStateService;
|
||||
use OCP\IRequest;
|
||||
use OCP\L10N\IFactory;
|
||||
use ChristophWurst\Nextcloud\Testing\TestCase;
|
||||
|
@ -39,11 +39,12 @@ class PageControllerTest extends TestCase {
|
|||
/** @var IRequest|MockObject */
|
||||
private $request;
|
||||
|
||||
// /** @var IInitialStateService|MockObject */
|
||||
// private $initialStateService;
|
||||
/** @var IInitialStateService|MockObject */
|
||||
private $initialStateService;
|
||||
|
||||
/** @var IFactory|MockObject */
|
||||
private $languageFactory;
|
||||
|
||||
/** @var IConfig|MockObject*/
|
||||
private $config;
|
||||
|
||||
|
@ -52,15 +53,15 @@ class PageControllerTest extends TestCase {
|
|||
parent::setUp();
|
||||
|
||||
$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->config = $this->createMock(IConfig::class);
|
||||
|
||||
$this->controller = new PageController(
|
||||
'contacts',
|
||||
$this->request,
|
||||
// $this->initialStateService,
|
||||
$this->config,
|
||||
$this->initialStateService,
|
||||
$this->languageFactory
|
||||
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue