mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-09 21:43:22 +09:00
* Remove guest API system version endpoint * Moved theme information to Admin API * Removed references to the old "comment" module * Remove unused cron endpoints * Don't pass registrar information to guests * Filter out Product toApiArray properties * Redact public ticket information passed via the guest API * Move redaction logic to the serializer * Moved honeypot information to a Twig function * More redaction * Fixed tests * Block additional paths * Reduce the amount of information passed to clients * Mask file downloads behind sendFile rather than serializing original path * Move honeypot information to the new Twig function * Add missing curly bracket * Removed unused `get_slider` endpoint * Turn publicMessageToApiArray into an allowlist --------- Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
34 lines
1.1 KiB
PHP
34 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace ThemeTests;
|
|
|
|
use APIHelper\Request;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
final class AdminTest extends TestCase
|
|
{
|
|
public function testGetCurrentClientTheme(): void
|
|
{
|
|
$result = Request::makeRequest('admin/theme/get_current');
|
|
$this->assertTrue($result->wasSuccessful(), $result->generatePHPUnitMessage());
|
|
$this->assertIsArray($result->getResult());
|
|
|
|
$this->assertArrayHasKey('name', $result->getResult());
|
|
$this->assertArrayHasKey('version', $result->getResult());
|
|
$this->assertEquals('FOSSBilling', $result->getResult()['author']);
|
|
}
|
|
|
|
public function testGetCurrentAdminTheme(): void
|
|
{
|
|
$result = Request::makeRequest('admin/theme/get_current', ['client' => false]);
|
|
$this->assertTrue($result->wasSuccessful(), $result->generatePHPUnitMessage());
|
|
$this->assertIsArray($result->getResult());
|
|
|
|
$this->assertArrayHasKey('name', $result->getResult());
|
|
$this->assertArrayHasKey('version', $result->getResult());
|
|
$this->assertEquals('FOSSBilling', $result->getResult()['author']);
|
|
}
|
|
}
|