Files
oficial/app/tests/performance/APITest.php
Juan Pablo Vial f3a5fa2cdc Tests
2024-03-20 23:06:38 -03:00

18 lines
478 B
PHP

<?php
namespace ProVM\Performance;
use GuzzleHttp\Client;
use PHPUnit\Framework;
class APITest extends Framework\TestCase
{
public function testLoad(): void
{
$client = new Client(['base_uri' => 'http://proxy']);
$start = microtime(true);
$response = $client->get('/api', ['headers' => ['Authorization' => 'Bearer ' . md5($_ENV['API_KEY'])]]);
$end = microtime(true);
$this->assertLessThanOrEqual(1000, $end - $start);
}
}