mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-04-10 15:03:45 +00:00
42 lines
1.0 KiB
PHP
42 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/*
|
|
* Chill is a software for social workers
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Controller;
|
|
|
|
use Chill\MainBundle\Test\PrepareClientTrait;
|
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
|
|
|
/**
|
|
* @internal
|
|
*
|
|
* @coversNothing
|
|
*/
|
|
class TicketListControllerTest extends WebTestCase
|
|
{
|
|
use PrepareClientTrait;
|
|
|
|
public function testList(): void
|
|
{
|
|
$client = $this->getClientAuthenticated();
|
|
|
|
$client->request('GET', '/fr/ticket/ticket/list');
|
|
|
|
// The controller requires TicketVoter::READ permission.
|
|
// If no fixtures grant this permission to the test user,
|
|
// the response will be 403.
|
|
if (403 === $client->getResponse()->getStatusCode()) {
|
|
self::markTestSkipped('The test user does not have CHILL_TICKET_TICKET_READ permission. Add ticket permission fixtures to enable this test.');
|
|
}
|
|
|
|
self::assertResponseIsSuccessful();
|
|
}
|
|
}
|