function testImportUseMutators() { $object = new ObjectTestVersion(); $object->import(array('bar' => 'foo')); $this->assertEqual('foo_set_called', $object->bar); $object->import(array('bar' => 'raw_foo'), $raw = true); $this->assertEqual('raw_foo', $object->bar); }
function testImportIgnoresGuardedProperties() { $object = new ObjectTestVersion(); $object->_guarded = 'yeah'; $object->import(array('_guarded' => 'no')); $this->assertEqual($object->_guarded, 'yeah'); }