add test of NonUniqueResultException message presence
This commit is contained in:
parent
8952176c73
commit
c2167664fc
1 changed files with 25 additions and 0 deletions
25
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC4024Test.php
Normal file
25
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC4024Test.php
Normal 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());
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue