metatag_dc.tags.test 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * @file
  4. * Tests that each of the Metatag Dublin Core tags work correctly.
  5. */
  6. /**
  7. * Tests that each of the Metatag Dublin Core tags work correctly.
  8. */
  9. class MetatagDcTagsTest extends MetatagTagsTestBase {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. public static function getInfo() {
  14. return array(
  15. 'name' => 'Metatag tags: Dublin Core',
  16. 'description' => 'Test the Dublin Core meta tags.',
  17. 'group' => 'Metatag',
  18. );
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public $tags = array(
  24. 'dcterms.contributor',
  25. 'dcterms.coverage',
  26. 'dcterms.creator',
  27. 'dcterms.date',
  28. 'dcterms.description',
  29. 'dcterms.format',
  30. 'dcterms.identifier',
  31. 'dcterms.language',
  32. 'dcterms.publisher',
  33. 'dcterms.relation',
  34. 'dcterms.rights',
  35. 'dcterms.source',
  36. 'dcterms.subject',
  37. 'dcterms.title',
  38. 'dcterms.type',
  39. );
  40. /**
  41. * {@inheritdoc}
  42. */
  43. function setUp(array $modules = array()) {
  44. $modules[] = 'metatag_dc';
  45. parent::setUp($modules);
  46. }
  47. /**
  48. * {@inheritdoc}
  49. */
  50. public function getTestTagName($tag_name) {
  51. return str_replace('dcterms_', 'dcterms.', $tag_name);
  52. }
  53. /**
  54. * Implements {meta_tag_name}_test_key() for 'dcterms.type'.
  55. */
  56. public function dcterms_type_test_key() {
  57. return 'metatags[und][dcterms.type][value]';
  58. }
  59. /**
  60. * Implements {meta_tag_name}_test_value() for 'dcterms.type'.
  61. */
  62. public function dcterms_type_test_value() {
  63. return 'Text';
  64. }
  65. /**
  66. * Implements {meta_tag_name}_test_field_xpath() for 'dcterms.type'.
  67. */
  68. public function dcterms_type_test_field_xpath() {
  69. return "//select[@name='metatags[und][dcterms.type][value]']";
  70. }
  71. }