private function SpiController::testCollect in Acquia Connector 8
Same name and namespace in other branches
- 8.2 src/Controller/SpiController.php \Drupal\acquia_connector\Controller\SpiController::testCollect()
- 3.x src/Controller/SpiController.php \Drupal\acquia_connector\Controller\SpiController::testCollect()
Collects all user-contributed test results that pass validation.
Return value
array An associative array containing properly formatted user-contributed tests.
1 call to SpiController::testCollect()
- SpiController::get in src/
Controller/ SpiController.php - Gather site profile information about this site.
File
- src/
Controller/ SpiController.php, line 229
Class
- SpiController
- SPI Controller class.
Namespace
Drupal\acquia_connector\ControllerCode
private function testCollect() {
$custom_data = [];
// Collect all custom data provided by hook_insight_custom_data().
$collections = $this
->moduleHandler()
->invokeAll('acquia_connector_spi_test');
foreach ($collections as $test_name => $test_params) {
$status = new TestStatusController();
$result = $status
->testValidate([
$test_name => $test_params,
]);
if ($result['result']) {
$custom_data[$test_name] = $test_params;
}
}
return $custom_data;
}