protected function LocationTestCase::flattenPostData in Location 7.3
Same name and namespace in other branches
- 6.3 tests/location_testcase.php \LocationTestCase::flattenPostData()
- 7.5 tests/location_testcase.php \LocationTestCase::flattenPostData()
- 7.4 tests/location_testcase.php \LocationTestCase::flattenPostData()
Flatten a post settings array because drupalPost isn't smart enough to.
5 calls to LocationTestCase::flattenPostData()
- CowInstanceTest::testCOWConservation in tests/
cow.test - CowInstanceTest::testNodeRevisionCOW in tests/
cow.test - LocationCCKTest::addLocationContentType in tests/
location_cck.test - LocationTestCase::addLocationContentType in tests/
location_testcase.test - LocationTestCase::drupalCreateNodeViaForm in tests/
location_testcase.test - Creates a node based on default settings. This uses the internal simpletest browser, meaning the node will be owned by the current simpletest _browser user.
File
- tests/
location_testcase.test, line 65 - Common functions for Location tests.
Class
- LocationTestCase
- Class LocationTestCase.
Code
protected function flattenPostData(&$edit) {
do {
$edit_flattened = TRUE;
foreach ($edit as $k => $v) {
if (is_array($v)) {
$edit_flattened = FALSE;
foreach ($v as $kk => $vv) {
$edit["{$k}[{$kk}]"] = $vv;
}
unset($edit[$k]);
}
}
} while (!$edit_flattened);
}