public function testDiff() { $this->field = mock('Tracker_FormElement_Field_Integer'); $int_1 = new Tracker_Artifact_ChangesetValue_Integer(111, $this->field, false, 66); $int_2 = new Tracker_Artifact_ChangesetValue_Integer(111, $this->field, false, 666); $this->assertEqual($int_1->diff($int_2), 'changed from 666 to 66'); }
function testDiff() { $GLOBALS['Language']->setReturnValue('getText', 'changed from', array('plugin_tracker_artifact', 'changed_from')); $GLOBALS['Language']->setReturnValue('getText', 'to', array('plugin_tracker_artifact', 'to')); $field = new MockTracker_FormElement_Field_Integer(); $int_1 = new Tracker_Artifact_ChangesetValue_Integer(111, $field, false, 66); $int_2 = new Tracker_Artifact_ChangesetValue_Integer(111, $field, false, 666); $this->assertEqual($int_1->diff($int_2), 'changed from 666 to 66'); }