You are here

public function InstantiatorTest::testExceptionOnUnSerializationException in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php \DoctrineTest\InstantiatorTest\InstantiatorTest::testExceptionOnUnSerializationException()

File

vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php, line 73

Class

InstantiatorTest
Tests for { @author Marco Pivetta <ocramius@gmail.com>

Namespace

DoctrineTest\InstantiatorTest

Code

public function testExceptionOnUnSerializationException() {
  if (defined('HHVM_VERSION')) {
    $this
      ->markTestSkipped('As of facebook/hhvm#3432, HHVM has no PDORow, and therefore ' . ' no internal final classes that cannot be instantiated');
  }
  $className = 'DoctrineTest\\InstantiatorTestAsset\\UnserializeExceptionArrayObjectAsset';
  if (\PHP_VERSION_ID >= 50600) {
    $className = 'PDORow';
  }
  if (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513) {
    $className = 'DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset';
  }
  $this
    ->setExpectedException('Doctrine\\Instantiator\\Exception\\UnexpectedValueException');
  $this->instantiator
    ->instantiate($className);
}