Commit a348e332 authored by Marco Pivetta's avatar Marco Pivetta

#869 - DBAL-1293 - Previous exceptions should be preserved by the `ConversionException`

parent 52fe0e46
......@@ -40,6 +40,16 @@ class ConversionExceptionTest extends PHPUnit_Framework_TestCase
);
}
public function testConversionFailedFormatPreservesPreviousException()
{
$previous = new \Exception();
$exception = ConversionException::conversionFailedFormat('foo', 'bar', 'baz', $previous);
$this->assertInstanceOf('Doctrine\DBAL\Types\ConversionException', $exception);
$this->assertSame($previous, $exception->getPrevious());
}
/**
* @return mixed[][]
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment