You are here

function LocationTestCase::flattenPostData in Location 7.4

Same name and namespace in other branches
  1. 6.3 tests/location_testcase.php \LocationTestCase::flattenPostData()
  2. 7.5 tests/location_testcase.php \LocationTestCase::flattenPostData()
  3. 7.3 tests/location_testcase.test \LocationTestCase::flattenPostData()

Flatten a post settings array because drupalPost isn't smart enough to.

8 calls to LocationTestCase::flattenPostData()
CowInstanceTest::testCOWConservation in tests/cow.test
CowInstanceTest::testNodeRevisionCOW in tests/cow.test
LocationCCKTest::addLocationContentType in tests/location_cck.test
LocationCCKTest::testCOWConservation in tests/location_cck.test
LocationCCKTest::testNodeRevisionCleanup in tests/location_cck.test

... See full list

File

tests/location_testcase.php, line 69
Common functions for Location tests.

Class

LocationTestCase

Code

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);
}