- Timestamp:
- 11/03/08 13:48:54 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Release04x02/twikiplugins/UnitTestContrib/test/unit/FormDefTests.pm
r21 r413 179 179 } 180 180 181 sub test_makeFromMeta { 182 my $this = shift; 183 $this->{twiki}->{store}->saveTopic( 184 $this->{twiki}->{user}, $this->{test_web}, 'SplodgeOne', <<FORM); 185 %META:FORM{name="NonExistantForm"}% 186 %META:FIELD{name="Ecks" attributes="" title="X" value="Blah"}% 187 FORM 188 my ($meta, $text) = 189 $this->{twiki}->{store}->readTopic( 190 undef, $this->{test_web}, 'SplodgeOne'); 191 my $form = new TWiki::Form( 192 $this->{twiki}, $this->{test_web}, 'NonExistantForm', $meta); 193 my $f = $form->getField('Ecks'); 194 $this->assert_str_equals('', $f->getDefaultValue()); 195 $this->assert_str_equals('Ecks', $f->{name}); 196 $this->assert_str_equals('X', $f->{title}); 197 $this->assert_str_equals('', $f->{size}); 198 } 199 181 200 1;
Note: See TracChangeset
for help on using the changeset viewer.
