InstantiatorTest\InstantiatorTest::testInstancesAreNotCloned PHP Method

testInstancesAreNotCloned() public method

    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);
    }