NC app base
This commit is contained in:
27
tests/Unit/Controller/PageControllerTest.php
Normal file
27
tests/Unit/Controller/PageControllerTest.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
// SPDX-FileCopyrightText: Szabó Dávid <daevidt@gmail.com>
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
namespace OCA\Nezd\Tests\Unit\Controller;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
|
||||
class PageControllerTest extends TestCase {
|
||||
private PageController $controller;
|
||||
|
||||
public function setUp(): void {
|
||||
$request = $this->getMockBuilder(\OCP\IRequest::class)->getMock();
|
||||
$this->controller = new PageController($request);
|
||||
}
|
||||
|
||||
public function testIndex(): void {
|
||||
$result = $this->controller->index();
|
||||
|
||||
$this->assertEquals('main', $result->getTemplateName());
|
||||
$this->assertTrue($result instanceof TemplateResponse);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user