accessibility_testswarm.module

  1. cis7 sites/all/modules/ulmus/accessibility/modules/accessibility_testswarm/accessibility_testswarm.module
  2. cle7 sites/all/modules/ulmus/accessibility/modules/accessibility_testswarm/accessibility_testswarm.module
  3. ecd7 sites/all/modules/ulmus/accessibility/modules/accessibility_testswarm/accessibility_testswarm.module
  4. elmsmedia7 sites/all/modules/ulmus/accessibility/modules/accessibility_testswarm/accessibility_testswarm.module
  5. harmony7 sites/all/modules/ulmus/accessibility/modules/accessibility_testswarm/accessibility_testswarm.module
  6. icor7 sites/all/modules/ulmus/accessibility/modules/accessibility_testswarm/accessibility_testswarm.module
  7. meedjum_blog7 sites/all/modules/ulmus/accessibility/modules/accessibility_testswarm/accessibility_testswarm.module
  8. mooc7 sites/all/modules/ulmus/accessibility/modules/accessibility_testswarm/accessibility_testswarm.module

Functions

Namesort descending Description
accessibility_testswarm_accessibility_testswarm_paths Implements hook_accessibility_testswarm_paths()
accessibility_testswarm_menu Implements hook_menu();
accessibility_testswarm_testswarm_tests Implements hook_testswarm_tests();

File

sites/all/modules/ulmus/accessibility/modules/accessibility_testswarm/accessibility_testswarm.module
View source
  1. <?php
  2. /**
  3. * Implements hook_testswarm_tests();
  4. */
  5. function accessibility_testswarm_testswarm_tests() {
  6. $library_path = libraries_get_path('quail');
  7. $paths = module_invoke_all('accessibility_testswarm_paths');
  8. if (!$paths || !count($paths)) {
  9. return;
  10. }
  11. $tests = array();
  12. foreach ($paths as $path) {
  13. $tests['accessibility_testswarm_tests_' . md5($path)] = array(
  14. 'js' => array(
  15. $library_path . '/src/quail.js',
  16. drupal_get_path('module', 'accessibility_testswarm') . '/js/accessibility_testswarm.test.js' => array()
  17. ),
  18. 'path' => $path
  19. );
  20. }
  21. return $tests;
  22. }
  23. /**
  24. * Implements hook_accessibility_testswarm_paths()
  25. */
  26. function accessibility_testswarm_accessibility_testswarm_paths() {
  27. $paths = variable_get('accessibility_testswarm_paths', '');
  28. return explode("\n", $paths);
  29. }
  30. /**
  31. * Implements hook_menu();
  32. */
  33. function accessibility_testswarm_menu() {
  34. $items = array();
  35. $items['admin/config/accessibility/testing'] = array(
  36. 'title' => 'Automated testing',
  37. 'description' => 'Enable TestSwarm testing for accessibility.',
  38. 'page callback' => 'drupal_get_form',
  39. 'page arguments' => array('accessibility_testswarm_admin_form'),
  40. 'access arguments' => array('administer site configuration'),
  41. 'file' => 'accessibility_testswarm.admin.inc'
  42. );
  43. return $items;
  44. }