function hook_acquia_spi_test in Acquia Connector 7.3
Same name and namespace in other branches
- 6.2 acquia_spi/acquia_spi.api.php \hook_acquia_spi_test()
- 7.2 acquia_spi/acquia_spi.api.php \hook_acquia_spi_test()
Include data to be sent to Acquia Insight as part of the SPI process.
This data will be stored on Acquia's servers in an unencrypted database, so be careful not to send sensitive information in any field. Multiple tests can also be added per callback provided that each test has a unique identifier.
Return value
array An array of user-contributed test data keyed by unique identifier.
- (string) description: Detailed information regarding test, its impact, and other relevant details. Cannot exceed 1024 characters.
- (string) solved_message: The message to display when the test has succeeded. Cannot exceed 1024 characters.
- (string) failed_message: The message to display when the test has failed. Cannot exceed 1024 characters.
- (boolean) solved: A flag indicating whether or not the test was successful.
- (string) fix_details: Information on how to fix or resolve the test if failed. Cannot exceed 1024 characters.
- (string) category: The category to place the test within. Must be either 'performance', 'security, or 'best_practices'.
- (int) severity: The priority level of the custom test. Must be either 0, 1, 2, 4, 8, 16, 32, 64, or 128. Higher severities impact the Insight score proportionally.
5 invocations of hook_acquia_spi_test()
- acquia_spi_requirements in acquia_spi/
acquia_spi.install - Implements hook_requirements().
- acquia_spi_test_collect in acquia_spi/
acquia_spi.module - Collects all user-contributed test results that pass validation.
- acquia_spi_test_enable in acquia_spi/
acquia_spi.module - Implements hook_enable().
- acquia_spi_test_status in acquia_spi/
acquia_spi.module - Determines the status of all user-contributed tests.
- drush_acquia_spi_custom_test_validate in acquia_spi/
acquia_spi.drush.inc - A command callback and drush wrapper for custom test validation.
File
- acquia_spi/
acquia_spi.api.php, line 62 - This file contains no working PHP code.
Code
function hook_acquia_spi_test() {
return array(
'unique_example' => array(
'description' => 'This example test is useful.',
'solved_message' => 'The test was successful',
'failed_message' => 'The test has failed',
'solved' => TRUE,
'fix_details' => 'Please resolve this issue using this fix information.',
'category' => 'best_practices',
'severity' => 0,
),
);
}