Files
crm_ecosplay/tests/Exception/UserAlreadyExistsExceptionTest.php

22 lines
585 B
PHP

<?php
namespace App\Tests\Exception;
use App\Exception\UserAlreadyExistsException;
use PHPUnit\Framework\TestCase;
class UserAlreadyExistsExceptionTest extends TestCase
{
public function testDefaultMessage(): void
{
$exception = new UserAlreadyExistsException();
$this->assertEquals('Un compte existe deja avec cet email.', $exception->getMessage());
}
public function testCustomMessage(): void
{
$exception = new UserAlreadyExistsException('Custom error');
$this->assertEquals('Custom error', $exception->getMessage());
}
}