Working state
This commit is contained in:
@@ -6,12 +6,14 @@ namespace Tests\Shared;
|
||||
use App\Shared\Exception\NotFoundException;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
#[\PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations]
|
||||
|
||||
final class NotFoundExceptionTest extends TestCase
|
||||
{
|
||||
public function testConstructorFormatsEntityAndIdentifierInMessage(): void
|
||||
public function testMessageContainsEntityAndIdentifier(): void
|
||||
{
|
||||
$exception = new NotFoundException('Article', 15);
|
||||
$exception = new NotFoundException('Article', 'mon-slug');
|
||||
|
||||
self::assertSame('Article introuvable : 15', $exception->getMessage());
|
||||
self::assertSame('Article introuvable : mon-slug', $exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user