Exemplo n.º 1
0
 function testValidateUpdateFieldNotSubmitted()
 {
     stub($this->field1)->isValid()->returns(true);
     stub($this->field1)->userCanUpdate()->returns(true);
     stub($this->field1)->isRequired()->returns(true);
     stub($this->field2)->isValid()->returns(true);
     stub($this->field3)->isValid()->returns(true);
     stub($this->workflow)->validate()->returns(true);
     $this->changeset_value1->setReturnValue('getValue', 999);
     $GLOBALS['Language']->expectNever('getText', array('plugin_tracker_common_artifact', 'err_required', '*'));
     $fields_data = array();
     $this->assertTrue($this->new_changeset_fields_validator->validate($this->artifact_update, $fields_data));
     $this->assertFalse(isset($fields_data[101]));
 }