metatag_dc.tags.test 1.6 KB

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