Files
oficial/app/tests/acceptance/LoginTest.php
Juan Pablo Vial 6617a92f5f Tests
2024-03-20 13:49:58 -03:00

31 lines
887 B
PHP

<?php
use PHPUnit\Framework;
class LoginTest extends Framework\TestCase
{
public function testShowLogin(): void
{
$client = $this->getClient();
$response = $client->get('/login');
$login = $response->getBody()->getContents();
$expected = [
'<input type="text" id="name" name="name" />',
'<input type="password" id="password" name="password" />',
'<button class="ui button" id="enter">Ingresar</button>'
];
foreach ($expected as $segment) {
$this->assertStringContainsString($segment, $login);
}
}
public function testDoLogin(): void
{
$client = $this->getClient();
$response = $client->get('/login');
}
protected function getClient(): GuzzleHttp\Client
{
return new GuzzleHttp\Client(['base_uri' => 'http://proxy']);
}
}