26 lines
595 B
PHP
26 lines
595 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace OCA\RePod\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);
|
||
|
}
|
||
|
}
|