diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-19 18:28:16 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-19 18:28:16 +0000 |
commit | 24669bfb50d643330cd50cbeea21d19d51107a36 (patch) | |
tree | 93eca4ca9d1a4b409b6ee4aac75362080136a5a4 /modules/rdf/tests | |
parent | 0b750209b6ead13c836852eb96bc6cc8f14de51f (diff) | |
download | brdo-24669bfb50d643330cd50cbeea21d19d51107a36.tar.gz brdo-24669bfb50d643330cd50cbeea21d19d51107a36.tar.bz2 |
- Patch #493030 by scor, Stefan Freudenberg, pwolanin, fago, Benjamin Melançon, kriskras, dmitrig01, sun: added RDFa support to Drupal core. Oh my, oh my.
Diffstat (limited to 'modules/rdf/tests')
-rw-r--r-- | modules/rdf/tests/rdf_test.info | 9 | ||||
-rw-r--r-- | modules/rdf/tests/rdf_test.install | 26 | ||||
-rw-r--r-- | modules/rdf/tests/rdf_test.module | 44 |
3 files changed, 79 insertions, 0 deletions
diff --git a/modules/rdf/tests/rdf_test.info b/modules/rdf/tests/rdf_test.info new file mode 100644 index 000000000..72f6518ec --- /dev/null +++ b/modules/rdf/tests/rdf_test.info @@ -0,0 +1,9 @@ +; $Id$ +name = "RDF module tests" +description = "Support module for RDF module testing." +package = Testing +version = VERSION +core = 7.x +files[] = rdf_test.install +files[] = rdf_test.module +hidden = TRUE diff --git a/modules/rdf/tests/rdf_test.install b/modules/rdf/tests/rdf_test.install new file mode 100644 index 000000000..ba7086ddd --- /dev/null +++ b/modules/rdf/tests/rdf_test.install @@ -0,0 +1,26 @@ +<?php +// $Id$ + +/** + * @file + * Install, update and uninstall functions for the rdf module. + */ + +/** + * Implement hook_install(). + */ +function rdf_test_install() { + $rdf_mappings = array( + array( + 'type' => 'node', + 'bundle' => 'test_bundle_hook_install', + 'mapping' => array( + 'rdftype' => array('foo:mapping_install1', 'bar:mapping_install2'), + ), + ), + ); + + foreach ($rdf_mappings as $rdf_mapping) { + rdf_save_mapping($rdf_mapping); + } +} diff --git a/modules/rdf/tests/rdf_test.module b/modules/rdf/tests/rdf_test.module new file mode 100644 index 000000000..72959705f --- /dev/null +++ b/modules/rdf/tests/rdf_test.module @@ -0,0 +1,44 @@ +<?php +// $Id$ + +/** + * @file + * Dummy module implementing RDF related hooks to test API interaction with + * the RDF module. + */ + +/** + * Implementation of hook_rdf_mapping(). + */ +function rdf_test_rdf_mapping() { + return array( + 0 => array( + 'type' => 'test_entity', + 'bundle' => 'test_bundle', + 'mapping' => array( + 'rdftype' => array('sioc:Post'), + 'title' => array( + 'predicates' => array('dc:title'), + ), + 'created' => array( + 'predicates' => array('dc:created'), + 'datatype' => 'xsd:dateTime', + 'callback' => 'date_iso8601', + ), + 'uid' => array( + 'predicates' => array('sioc:has_creator', 'dc:creator'), + ), + 'foobar' => array( + 'predicates' => array('foo:bar'), + ), + ), + ), + 1 => array( + 'type' => 'node', + 'bundle' => 'blog', + 'mapping' => array( + 'rdftype' => array('sioct:Weblog'), + ) + ), + ); +} |