Skip to content

Commit

Permalink
More test output on intermittant error
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Feb 21, 2017
1 parent f16074c commit ffd05fe
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/phpunit/api/v3/LoggingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,17 @@ public function testRevertRestrictedTables() {
// To protect against the modified date not changing due to the updates being too close together.
sleep(1);
$loggings = $this->callAPISuccess('Logging', 'get', array('log_conn_id' => 'bitty bot bot', 'tables' => array('civicrm_address')));
$this->assertEquals('civicrm_address', $loggings['values'][0]['table'], CRM_Core_DAO::executeQuery('SELECT * FROM log_civicrm_address')->toArray());
$dao = CRM_Core_DAO::executeQuery('SELECT * FROM log_civicrm_address');
while ($dao->fetch()) {
$rowKey = uniqid();
foreach (get_object_vars($dao) as $key => $value) {
if (substr($key, 0,1) !== '_') {
$logs[$rowKey][$key] = $value;
}
}
}
$this->assertEquals(array(0 => 'blah'), $logs, print_r($logs, 1));
$this->assertEquals('civicrm_address', $loggings['values'][0]['table'], print_r(CRM_Core_DAO::executeQuery('SELECT * FROM log_civicrm_address')->toArray(), 1));
$this->assertEquals(1, $loggings['count'], CRM_Core_DAO::executeQuery('SELECT * FROM log_civicrm_address')->toArray());
$this->assertEquals('27 Cool way', $loggings['values'][0]['from']);
$this->assertEquals('25 Dorky way', $loggings['values'][0]['to']);
Expand Down

0 comments on commit ffd05fe

Please sign in to comment.