public function InstantiatorTest::testInstancesAreNotCloned in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php \DoctrineTest\InstantiatorTest\InstantiatorTest::testInstancesAreNotCloned()
File
- vendor/
doctrine/ instantiator/ tests/ DoctrineTest/ InstantiatorTest/ InstantiatorTest.php, line 142
Class
- InstantiatorTest
- Tests for { @author Marco Pivetta <ocramius@gmail.com>
Namespace
DoctrineTest\InstantiatorTestCode
public function testInstancesAreNotCloned() {
$className = 'TemporaryClass' . uniqid();
eval('namespace ' . __NAMESPACE__ . '; class ' . $className . '{}');
$instance = $this->instantiator
->instantiate(__NAMESPACE__ . '\\' . $className);
$instance->foo = 'bar';
$instance2 = $this->instantiator
->instantiate(__NAMESPACE__ . '\\' . $className);
$this
->assertObjectNotHasAttribute('foo', $instance2);
}