31 lines
887 B
PHP
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']);
|
|
}
|
|
}
|