Files
FOSSBilling/tests/Health Checks/HealthTest.php
T
Belle Aerni 1b0fba1922 Various additional tests (#2069)
* Various additional tests

* Fixes

* More fixes

* Fixed my other mistakes

* Final fix
2024-01-15 00:46:19 -08:00

23 lines
784 B
PHP

<?php
declare(strict_types=1);
use APIHelper\Request;
use PHPUnit\Framework\TestCase;
final class HealthTest extends TestCase
{
public function testIsFOSSBillingWorking(): void
{
$response = Request::makeRequest('guest/system/company');
$this->assertTrue($response->wasSuccessful(), $response->generatePHPUnitMessage());
}
public function testStartingPatchNotBehind(): void
{
$response = Request::makeRequest('admin/system/is_behind_on_patches');
$this->assertTrue($response->wasSuccessful(), $response->generatePHPUnitMessage());
$this->assertNotTrue($response->getResult()); // This should return false to indicate there are no patches available, meaning the `last_patch` number is correct for fresh installs.
}
}