respect-validation/tests/library/Respect/Validation/Exceptions/AbstractGroupedExceptionTest.php
2012-02-05 16:13:34 +01:00

19 lines
No EOL
493 B
PHP

<?php
namespace Respect\Validation\Exceptions;
class AbstractGroupedExceptionTest extends \PHPUnit_Framework_TestCase
{
function test_one_or_more_grouped_exceptions_should_be_condensed_by_getRelated()
{
$int =new IntException();
$e = new AbstractGroupedException;
$e2 = new AbstractNestedException;
$e->addRelated($e2);
$e2->addRelated($int);
$result = $e->getRelated();
$this->assertSame($int, current($result));
}
}