You are here

function acquia_spi_test_collect in Acquia Connector 6.2

Same name and namespace in other branches
  1. 7.3 acquia_spi/acquia_spi.module \acquia_spi_test_collect()
  2. 7.2 acquia_spi/acquia_spi.module \acquia_spi_test_collect()

Collects all user-contributed test results that pass validation.

Return value

array $custom_data An associative array containing properly formatted user-contributed tests.

1 call to acquia_spi_test_collect()
acquia_spi_get in acquia_spi/acquia_spi.module
Gather site profile information about this site.

File

acquia_spi/acquia_spi.module, line 686
Send site profile information (NSPI) and system data to Acquia Insight.

Code

function acquia_spi_test_collect() {
  $custom_data = array();

  // Collect all custom data provided by hook_insight_custom_data().
  $collections = module_invoke_all('acquia_spi_test');
  foreach ($collections as $test_name => $test_params) {
    $result = acquia_spi_test_validate(array(
      $test_name => $test_params,
    ));
    if ($result['result']) {
      $custom_data[$test_name] = $test_params;
    }
  }
  return $custom_data;
}