mirror of
https://github.com/linuxserver/objectstorageapp.git
synced 2026-02-20 00:55:06 +08:00
30 lines
650 B
PHP
30 lines
650 B
PHP
<?php
|
|
|
|
namespace OCA\ObjectStorageBackblaze\Tests\Unit\Controller;
|
|
|
|
use PHPUnit_Framework_TestCase;
|
|
|
|
use OCP\AppFramework\Http\TemplateResponse;
|
|
|
|
|
|
class PageControllerTest extends PHPUnit_Framework_TestCase {
|
|
private $controller;
|
|
private $userId = 'john';
|
|
|
|
public function setUp() {
|
|
$request = $this->getMockBuilder('OCP\IRequest')->getMock();
|
|
|
|
$this->controller = new PageController(
|
|
'objectstoragebackblaze', $request, $this->userId
|
|
);
|
|
}
|
|
|
|
public function testIndex() {
|
|
$result = $this->controller->index();
|
|
|
|
$this->assertEquals('index', $result->getTemplateName());
|
|
$this->assertTrue($result instanceof TemplateResponse);
|
|
}
|
|
|
|
}
|