Abstracts

This commit is contained in:
Juan Pablo Vial
2025-04-29 22:25:32 -04:00
parent acb7a1336d
commit f8ac0f14f0
4 changed files with 40 additions and 14 deletions

View File

@ -0,0 +1,15 @@
<?php
namespace ProVM\Integration;
use Psr\Http\Client\ClientInterface;
use GuzzleHttp\Client;
use PHPUnit\Framework\TestCase;
abstract class AbstractIntegration extends TestCase
{
protected ClientInterface $client;
protected function setUp(): void
{
$this->client = new Client(['base_uri' => $_ENV['APP_URL']]);
}
}

View File

@ -1,17 +1,10 @@
<?php
namespace ProVM\Integration;
use PHPUnit\Framework\TestCase;
use GuzzleHttp\Client;
require __DIR__ . '/AbstractIntegration.php';
class HomeTest extends TestCase
class HomeTest extends AbstractIntegration
{
protected Client $client;
protected function setUp(): void
{
$this->client = new Client(['base_uri' => $_ENV['APP_URL']]);
}
public function testLoad(): void
{
$response = $this->client->get('/');