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

23 lines
485 B
PHP
Raw Normal View History

2024-03-20 23:06:38 -03:00
<?php
2025-05-08 11:13:17 -04:00
namespace Tests\Performance;
2024-03-20 23:06:38 -03:00
2025-04-29 21:42:57 -04:00
use GuzzleHttp\Client;
2025-05-08 11:13:17 -04:00
use Tests\Extension\AbstractPerformance;
2024-03-20 23:06:38 -03:00
2025-04-29 22:25:32 -04:00
class HomeTest extends AbstractPerformance
2024-03-20 23:06:38 -03:00
{
2025-04-29 21:42:57 -04: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-04-29 22:25:32 -04:00
$this->start();
2025-04-29 21:42:57 -04:00
$this->client->get('/');
2025-04-29 22:25:32 -04:00
$time = $this->end();
$this->assertLessThanOrEqual(1000, $time);
2024-03-20 23:06:38 -03:00
}
}