function NotificationsTestCase::dumpTable in Notifications 6.3
Same name and namespace in other branches
- 6.2 tests/notifications_test_case.inc \NotificationsTestCase::dumpTable()
File
- tests/
notifications_test_case.inc, line 56 - Base class for Notifications Tests
Class
- NotificationsTestCase
- @file Base class for Notifications Tests
Code
function dumpTable($table) {
$result = db_query('SELECT * FROM {' . $table . '}');
$output = 'Table dump <strong>' . $table . '</strong>:';
while ($row = db_fetch_array($result)) {
$rows[] = $row;
if (empty($header)) {
$header = array_keys($row);
}
}
if (!empty($rows)) {
$output .= theme('table', $header, $rows);
}
else {
$output .= ' No rows';
}
$this
->assertTrue(TRUE, $output);
}