MINOR: unit test assuming database IDs, doesn't hold in postgres

This commit is contained in:
Mark Stephens 2010-09-20 04:18:25 +00:00
parent 40592031ff
commit d99b76723c
1 changed files with 7 additions and 3 deletions

View File

@ -283,9 +283,13 @@ class EditableFormFieldTest extends FunctionalTest {
$this->assertEquals($option->Title, 'New - '. $orginal[$option->ID]['Title']);
$this->assertEquals($option->Sort, $orginal[$option->ID]['Sort'] + 1);
}
unset($data[1]);
// remove the first one. can't assume by ID
foreach($data as $key => $value) {
unset($data[$key]);
break;
}
$dropdown->populateFromPostData($data);
$this->assertEquals($dropdown->Options()->Count(), $count-1);