Skip to content
This repository was archived by the owner on Jul 12, 2019. It is now read-only.

Commit

Permalink
Merge pull request #12 from Ocramius/hotfix/hhvm-build-fix
Browse files Browse the repository at this point in the history
HHVM does not have a `PDORow` class - breaks test suite
  • Loading branch information
Ocramius committed Aug 11, 2014
2 parents 11aa050 + 741a75c commit 8aa99ef
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tests/InstantiatorTest/InstantiatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,23 @@ public function testInstantiatesSeparateInstances($className)

public function testExceptionOnUnSerializationException()
{
$className = 'InstantiatorTestAsset\\UnserializeExceptionArrayObjectAsset';

if (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513) {
$className = 'InstantiatorTestAsset\\SerializableArrayObjectAsset';
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 = 'InstantiatorTestAsset\\UnserializeExceptionArrayObjectAsset';

if (\PHP_VERSION_ID >= 50600) {
$className = 'PDORow';
}

if (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513) {
$className = 'InstantiatorTestAsset\\SerializableArrayObjectAsset';
}

$this->setExpectedException('Instantiator\\Exception\\UnexpectedValueException');

$this->instantiator->instantiate($className);
Expand Down

0 comments on commit 8aa99ef

Please sign in to comment.