2024-03-20 23:06:38 -03:00
|
|
|
<?php
|
2025-07-22 13:18:00 +00:00
|
|
|
namespace Tests\Performance;
|
2024-03-20 23:06:38 -03:00
|
|
|
|
|
|
|
use GuzzleHttp\Client;
|
2025-07-22 13:18:00 +00:00
|
|
|
use Tests\Extension\AbstractPerformance;
|
2024-03-20 23:06:38 -03:00
|
|
|
|
2025-07-22 13:18:00 +00:00
|
|
|
class HomeTest extends AbstractPerformance
|
2024-03-20 23:06:38 -03:00
|
|
|
{
|
2025-07-22 13:18:00 +00: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
|
|
|
|
{
|
2025-07-22 13:18:00 +00:00
|
|
|
$this->start();
|
|
|
|
$this->client->get('/');
|
|
|
|
$time = $this->end();
|
|
|
|
$this->assertLessThanOrEqual(1000, $time);
|
2024-03-20 23:06:38 -03:00
|
|
|
}
|
|
|
|
}
|