From dd82ac6bb7a1dfc1e66554286db5486a57de704f Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Tue, 29 Apr 2025 21:42:57 -0400 Subject: [PATCH] Tests Home --- app/tests/integration/HomeTest.php | 21 +++++++++++++++++++++ app/tests/performance/HomeTest.php | 11 ++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 app/tests/integration/HomeTest.php diff --git a/app/tests/integration/HomeTest.php b/app/tests/integration/HomeTest.php new file mode 100644 index 0000000..fc5a6fd --- /dev/null +++ b/app/tests/integration/HomeTest.php @@ -0,0 +1,21 @@ +client = new Client(['base_uri' => $_ENV['APP_URL']]); + } + + public function testLoad(): void + { + $response = $this->client->get('/'); + $this->assertEquals(200, $response->getStatusCode()); + $this->assertStringContainsString('Incoviba', $response->getBody()->getContents()); + } +} \ No newline at end of file diff --git a/app/tests/performance/HomeTest.php b/app/tests/performance/HomeTest.php index 9f978b8..820c2a7 100644 --- a/app/tests/performance/HomeTest.php +++ b/app/tests/performance/HomeTest.php @@ -1,16 +1,21 @@ 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(''); + $this->client->get('/'); $end = microtime(true); $this->assertLessThanOrEqual(1000, $end - $start); }