1
0
mirror of synced 2025-02-02 21:41:45 +03:00

add test of NonUniqueResultException message presence

This commit is contained in:
Jean Carlo Machado 2016-02-21 13:01:19 -03:00 committed by Luís Cobucci
parent 8952176c73
commit c2167664fc
No known key found for this signature in database
GPG Key ID: EC61C5F01750ED3C

View File

@ -0,0 +1,25 @@
<?php
namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\ORM\NonUniqueResultException;
/**
* @group DDC4024
*/
final class DDC4024Test extends \Doctrine\Tests\DoctrineTestCase
{
public function testConstructorShouldUseProvidedMessage() : void
{
$exception = new NonUniqueResultException('Testing');
self::assertSame('Testing', $exception->getMessage());
}
public function testADefaultMessageShouldBeUsedWhenNothingWasProvided() : void
{
$exception = new NonUniqueResultException();
self::assertSame(NonUniqueResultException::DEFAULT_MESSAGE, $exception->getMessage());
}
}