chore: initial import for test contour with k3s CI

This commit is contained in:
sova-bootstrap
2026-05-28 12:09:28 +03:00
commit d77d0a872f
423 changed files with 35401 additions and 0 deletions
@@ -0,0 +1,37 @@
<?php
namespace App\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class OnlineSpecialistsControllerTest extends WebTestCase
{
private const BROWSER_HEADERS = ['HTTP_USER_AGENT' => 'PHPUnit/OnlineConsultationTest'];
public function testOnlineSpecialistsRequiresAuthentication(): void
{
$client = static::createClient();
$client->request('GET', '/online-specialists', [], [], self::BROWSER_HEADERS);
$this->assertTrue(
$client->getResponse()->isRedirect() || $client->getResponse()->getStatusCode() === 401,
'Online specialists page must require authentication'
);
}
public function testOfflineSpecialistsListIsPublic(): void
{
$client = static::createClient();
$client->request('GET', '/specialists', [], [], self::BROWSER_HEADERS);
$this->assertResponseIsSuccessful();
}
public function testIntervalApiRequiresParameters(): void
{
$client = static::createClient();
$client->request('GET', '/api/interval', [], [], self::BROWSER_HEADERS);
$this->assertGreaterThanOrEqual(400, $client->getResponse()->getStatusCode());
}
}