mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-07-14 02:01:31 -04:00
24 lines
568 B
PHP
24 lines
568 B
PHP
<?php
|
|
|
|
use \PHPUnit\Framework\TestCase;
|
|
|
|
require_once(__DIR__ . '/../../lib/bootstrap.php');
|
|
|
|
class ApiTest extends TestCase {
|
|
public function testUserId(): void {
|
|
$api = new Gazelle\API\User([]);
|
|
|
|
$_GET['user_id'] = 1;
|
|
$_GET['req'] = 'stats';
|
|
$this->assertArrayHasKey('Username', $api->run());
|
|
}
|
|
|
|
public function testUsername(): void {
|
|
$api = new Gazelle\API\User([]);
|
|
|
|
$_GET['username'] = 'admin';
|
|
$_GET['req'] = 'stats';
|
|
$this->assertArrayHasKey('Username', $api->run());
|
|
}
|
|
}
|