mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-07-14 02:01:31 -04:00
25 lines
753 B
PHP
25 lines
753 B
PHP
<?php
|
|
|
|
use \PHPUnit\Framework\TestCase;
|
|
|
|
require_once(__DIR__ . '/../../../lib/bootstrap.php');
|
|
|
|
class RenderTGroupTest extends TestCase {
|
|
public function testRequest(): void {
|
|
$tgroupId = (int)Gazelle\DB::DB()->scalar('SELECT ID from torrents_group');
|
|
if (!$tgroupId) {
|
|
$this->assertTrue(true, 'skipped (no tgroup with open requests)');
|
|
return;
|
|
}
|
|
|
|
$reqMan = new Gazelle\Manager\Request;
|
|
$tgMan = new Gazelle\Manager\TGroup;
|
|
$this->assertIsString(
|
|
Gazelle\Util\Twig::factory()->render('torrent/request.twig', [
|
|
'list' => $reqMan->findByTGroup($tgMan->findById($tgroupId))
|
|
]),
|
|
'render-tgroup-request-list'
|
|
);
|
|
}
|
|
}
|