2024-03-20 23:06:38 -03:00
|
|
|
<?php
|
|
|
|
namespace ProVM\Performance;
|
|
|
|
|
2025-04-29 21:42:57 -04:00
|
|
|
use GuzzleHttp\Client;
|
2024-03-20 23:06:38 -03:00
|
|
|
|
2025-04-29 22:25:32 -04:00
|
|
|
require __DIR__ . '/AbstractPerformance.php';
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|