simpletest_example_test.module 674 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * @file
  4. * Implements simpletest_example_test module.
  5. */
  6. /**
  7. * The mock module for SimpleTest Example.
  8. *
  9. * This module exists so that we can enable it and use it to
  10. * test elements of simpletest_module.
  11. *
  12. * @ingroup simpletest_example
  13. */
  14. /**
  15. * Implements hook_node_view().
  16. *
  17. * We'll just add some content to nodes of the type we like.
  18. *
  19. * @ingroup simpletest_example
  20. */
  21. function simpletest_example_test_node_view($node, $view_mode, $langcode) {
  22. if ($node->type == 'simpletest_example') {
  23. $node->content['simpletest_example_test_section'] = array(
  24. '#markup' => t('The test module did its thing.'),
  25. '#weight' => -99,
  26. );
  27. }
  28. }