2024-04-25 08:03:54 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Controller;
|
|
|
|
|
|
|
|
use OCA\AppTemplate\AppInfo\Application;
|
|
|
|
use OCA\AppTemplate\Controller\ApiController;
|
|
|
|
use OCP\IRequest;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
2024-09-19 22:48:23 +00:00
|
|
|
final class ApiTest extends TestCase {
|
|
|
|
public function testIndex(): void {
|
2024-04-25 08:03:54 +00:00
|
|
|
$request = $this->createMock(IRequest::class);
|
|
|
|
$controller = new ApiController(Application::APP_ID, $request);
|
|
|
|
|
|
|
|
$this->assertEquals($controller->index()->getData()['message'], 'Hello world!');
|
|
|
|
}
|
|
|
|
}
|