I managed to put up a EcomDev_PHPUnit_Test_Case
with this:
public function testGetModelMemoryTrace() {
$model = Mage::getModel('catalog/product');
$product = $model->load(10);
$this->assertEquals($product->getId(), 10);
$parentProduct = $model->load(4);
$this->assertEquals($product->getId(), 10); //here getId() is actually 4...
}
This test fails for me in the last assert. Is this an expected effect ? To clarify, the second load alters first reference to object id 10.
Thank you.