feature/cierres (#25)
Varios cambios Co-authored-by: Juan Pablo Vial <jpvialb@incoviba.cl> Reviewed-on: #25
This commit is contained in:
@ -1,17 +1,22 @@
|
||||
<?php
|
||||
namespace ProVM\Performance;
|
||||
namespace Tests\Performance;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use PHPUnit\Framework;
|
||||
use Tests\Extension\AbstractPerformance;
|
||||
|
||||
class HomeTest extends Framework\TestCase
|
||||
class HomeTest extends AbstractPerformance
|
||||
{
|
||||
protected Client $client;
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->client = new Client(['base_uri' => $_ENV['APP_URL']]);
|
||||
}
|
||||
|
||||
public function testLoad(): void
|
||||
{
|
||||
$client = new Client(['base_uri' => 'http://proxy']);
|
||||
$start = microtime(true);
|
||||
$response = $client->get('');
|
||||
$end = microtime(true);
|
||||
$this->assertLessThanOrEqual(1000, $end - $start);
|
||||
$this->start();
|
||||
$this->client->get('/');
|
||||
$time = $this->end();
|
||||
$this->assertLessThanOrEqual(1000, $time);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user