function testDefaultValue() { $str_field = new Tracker_FormElement_Field_TextTestVersion(); $str_field->setReturnValue('getProperty', 'foo bar long text with nice stories', array('default_value')); $this->assertTrue($str_field->hasDefaultValue()); $this->assertEqual($str_field->getDefaultValue(), array('content' => 'foo bar long text with nice stories', 'format' => 'text')); }
public function testDefaultValue() { stub($this->user)->getPreference(PFUser::EDITION_DEFAULT_FORMAT)->returns('text'); $str_field = new Tracker_FormElement_Field_TextTestVersion(); $str_field->setReturnValue('getProperty', 'foo bar long text with nice stories', array('default_value')); $this->assertTrue($str_field->hasDefaultValue()); $this->assertEqual($str_field->getDefaultValue(), array('content' => 'foo bar long text with nice stories', 'format' => 'text')); }