mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
MINOR: unit test assuming database IDs, doesn't hold in postgres
This commit is contained in:
parent
40592031ff
commit
d99b76723c
@ -283,9 +283,13 @@ class EditableFormFieldTest extends FunctionalTest {
|
|||||||
$this->assertEquals($option->Title, 'New - '. $orginal[$option->ID]['Title']);
|
$this->assertEquals($option->Title, 'New - '. $orginal[$option->ID]['Title']);
|
||||||
$this->assertEquals($option->Sort, $orginal[$option->ID]['Sort'] + 1);
|
$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);
|
$dropdown->populateFromPostData($data);
|
||||||
|
|
||||||
$this->assertEquals($dropdown->Options()->Count(), $count-1);
|
$this->assertEquals($dropdown->Options()->Count(), $count-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user