示例#1
0
 function testUpdateWhileNoDirtyFields()
 {
     $object = new TestOneTableObject();
     $object->setAnnotation($initial_annotation = 'some annotation');
     $object->setContent($initial_content = 'some content');
     $object->save();
     $object->setAnnotation('some other annotation');
     $object->setContent('some other content');
     $object->resetPropertyDirtiness('content');
     $object->resetPropertyDirtiness('annotation');
     $object->save();
     $loaded_object = lmbActiveRecord::findById('TestOneTableObject', $object->getId());
     $this->assertEqual($loaded_object->getAnnotation(), $initial_annotation);
     $this->assertEqual($loaded_object->getContent(), $initial_content);
 }