Files
FOSSBilling/tests/integration/bb-modules/mod_api/ServiceTest.php
T
Belle Aerni 32d011225b Rector & PHP-CS-Fixer Improvements (#2047)
* Added the rector cache to the action

* Enabled PHP-CS fixer for the tests & library folder

* Use the PHP-CS-Fixer Cache

* Fix the tests

* Ensure the Sentry placeholder isn't messed up from CS changes

* Typo..
2024-01-08 00:10:00 +00:00

29 lines
760 B
PHP

<?php
#[\PHPUnit\Framework\Attributes\Group('Core')]
class ServiceTest extends BBDbApiTestCase
{
protected $_mod = 'api';
protected $_initialSeedFile = 'mod_api.xml';
public function testClasses()
{
$service = $this->di['mod_service']('api');
$api = $service->getApiGuest();
$this->assertInstanceOf('Api_Handler', $api);
$api = $service->getApiAdmin();
$this->assertInstanceOf('Api_Handler', $api);
$api = $service->getApiClient(1);
$this->assertInstanceOf('Api_Handler', $api);
$result = $service->getRequestCount('2001-05-06', '123.124.125.126');
$this->assertIsInt($result);
$result = $service->logRequest();
$this->assertIsInt($result);
}
}