You are here

function NotificationsTestCase::formatTable in Notifications 6.2

Same name and namespace in other branches
  1. 6.3 tests/notifications_test_case.inc \NotificationsTestCase::formatTable()
1 call to NotificationsTestCase::formatTable()
NotificationsTestCase::printObject in tests/notifications_test_case.inc

File

tests/notifications_test_case.inc, line 19
Base class for Notifications Tests

Class

NotificationsTestCase
@file Base class for Notifications Tests

Code

function formatTable($object) {
  foreach ($object as $key => $value) {
    $rows[] = array(
      $key,
      is_array($value) || is_object($value) ? $this
        ->formatTable($value) : $value,
    );
  }
  if (!empty($rows)) {
    return theme('table', array(), $rows);
  }
  else {
    return 'No properties';
  }
}