/** * Plain import of data into object * @see lmbObject::import() * @param array */ function importRaw($source) { parent::import($source); $this->markDirty(true); }
function testImportMergesWithExistingProps() { $object = new lmbObject(); $object->set('foo', 'hey'); $object->set('baz', 'wow'); $object->import(array('foo' => 'test', 'bar' => 'test2')); $this->assertEqual($object->get('foo'), 'test'); $this->assertEqual($object->get('bar'), 'test2'); $this->assertEqual($object->get('baz'), 'wow'); }