Files
oficial/app/tests/performance/HomeTest.php

23 lines
485 B
PHP
Raw Permalink Normal View History

2024-03-20 23:06:38 -03:00
<?php
namespace Tests\Performance;
2024-03-20 23:06:38 -03:00
use GuzzleHttp\Client;
use Tests\Extension\AbstractPerformance;
2024-03-20 23:06:38 -03:00
class HomeTest extends AbstractPerformance
2024-03-20 23:06:38 -03:00
{
protected Client $client;
protected function setUp(): void
{
$this->client = new Client(['base_uri' => $_ENV['APP_URL']]);
}
2024-03-20 23:06:38 -03:00
public function testLoad(): void
{
$this->start();
$this->client->get('/');
$time = $this->end();
$this->assertLessThanOrEqual(1000, $time);
2024-03-20 23:06:38 -03:00
}
}