1
0
mirror of synced 2025-01-19 15:01:40 +03:00

DDC-3120 - add failing test for un-serialization of an internal PHP class

This commit is contained in:
Marco Pivetta 2014-08-14 15:38:55 +02:00
parent 2c3126353c
commit d52dd39592

View File

@ -1100,6 +1100,16 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
$this->assertFalse($class->isIdentifier('foo')); $this->assertFalse($class->isIdentifier('foo'));
} }
/**
* @group DDC-3120
*/
public function testCanInstantiateInternalPhpClassSubclass()
{
$classMetadata = new ClassMetadata(__NAMESPACE__ . '\\MyArrayObjectEntity');
$this->assertInstanceOf(__NAMESPACE__ . '\\MyArrayObjectEntity', $classMetadata->newInstance());
}
} }
/** /**
@ -1136,3 +1146,7 @@ class MyPrefixNamingStrategy extends \Doctrine\ORM\Mapping\DefaultNamingStrategy
return strtolower($this->classToTableName($className)) . '_' . $propertyName; return strtolower($this->classToTableName($className)) . '_' . $propertyName;
} }
} }
class MyArrayObjectEntity extends \ArrayObject
{
}