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