Exemplo n.º 1
0
 public function test_others_readable()
 {
     $field = Model_Field::forge(array('key' => 'testkey', 'label' => 'testlabel', 'value' => 'testvalue'));
     $field->set_others('foo:bar hoge:fuga');
     $this->assertEquals($field->others_readable(), 'foo:bar hoge:fuga');
     $field->set_others('');
     $this->assertEquals($field->others_readable(), '');
 }
Exemplo n.º 2
0
 public function set_field($type, $key, $label, $value, $others)
 {
     $field = Model_Field::forge(array('type' => $type, 'key' => $key, 'label' => $label, 'value' => $value));
     $field->set_others($others);
     $this->fields[] = $field;
     $this->save();
 }