Files
e-ticket/tests/Controller/RedirectControllerTest.php

25 lines
596 B
PHP
Raw Normal View History

<?php
namespace App\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class RedirectControllerTest extends WebTestCase
{
public function testNoUrlRedirectsToHome(): void
{
$client = static::createClient();
$client->request('GET', '/external-redirect');
self::assertResponseRedirects('/');
}
public function testWithUrlRendersWarningPage(): void
{
$client = static::createClient();
$client->request('GET', '/external-redirect?redirUrl=https://example.com');
self::assertResponseIsSuccessful();
}
}