public function UnexpectedValueExceptionTest::testFromSerializationTriggeredException in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php \DoctrineTest\InstantiatorTest\Exception\UnexpectedValueExceptionTest::testFromSerializationTriggeredException()
File
- vendor/
doctrine/ instantiator/ tests/ DoctrineTest/ InstantiatorTest/ Exception/ UnexpectedValueExceptionTest.php, line 36
Class
- UnexpectedValueExceptionTest
- Tests for { @author Marco Pivetta <ocramius@gmail.com>
Namespace
DoctrineTest\InstantiatorTest\ExceptionCode
public function testFromSerializationTriggeredException() {
$reflectionClass = new ReflectionClass($this);
$previous = new Exception();
$exception = UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $previous);
$this
->assertInstanceOf('Doctrine\\Instantiator\\Exception\\UnexpectedValueException', $exception);
$this
->assertSame($previous, $exception
->getPrevious());
$this
->assertSame('An exception was raised while trying to instantiate an instance of "' . __CLASS__ . '" via un-serialization', $exception
->getMessage());
}