1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2025-01-10 18:02:40 +00:00
Arsse/tests/REST/NextCloudNews/TestNCNVersionDiscovery.php

23 lines
555 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace JKingWeb\NewsSync;
use JKingWeb\NewsSync\Rest\Request;
use JKingWeb\NewsSync\Rest\Response;
class TestNCNVersionDiscovery extends \PHPUnit\Framework\TestCase {
use Test\Tools;
function setUp() {
$conf = new Conf();
$this->data = new Test\RuntimeData($conf);
}
function testVersionList() {
$exp = new Response(200, ['apiLevels' => ['v1-2']]);
$req = new Request("GET", "/");
$h = new Rest\NextCloudNews\Versions($this->data);
$res = $h->dispatch($req);
$this->assertEquals($exp, $res);
}
}