mirror of
https://github.com/tag1consulting/d7_to_d10_migration.git
synced 2025-05-30 00:55:12 +00:00
Initial commit
This commit is contained in:
commit
c5e731d8ae
2773 changed files with 600767 additions and 0 deletions
drupal7/web/modules/rdf/tests
12
drupal7/web/modules/rdf/tests/rdf_test.info
Normal file
12
drupal7/web/modules/rdf/tests/rdf_test.info
Normal file
|
@ -0,0 +1,12 @@
|
|||
name = "RDF module tests"
|
||||
description = "Support module for RDF module testing."
|
||||
package = Testing
|
||||
version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
dependencies[] = blog
|
||||
|
||||
; Information added by Drupal.org packaging script on 2024-03-06
|
||||
version = "7.100"
|
||||
project = "drupal"
|
||||
datestamp = "1709734591"
|
25
drupal7/web/modules/rdf/tests/rdf_test.install
Normal file
25
drupal7/web/modules/rdf/tests/rdf_test.install
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Install, update and uninstall functions for the rdf module.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements 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_mapping_save($rdf_mapping);
|
||||
}
|
||||
}
|
66
drupal7/web/modules/rdf/tests/rdf_test.module
Normal file
66
drupal7/web/modules/rdf/tests/rdf_test.module
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Test API interaction with the RDF module.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_rdf_mapping().
|
||||
*/
|
||||
function rdf_test_rdf_mapping() {
|
||||
return array(
|
||||
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'),
|
||||
'type' => 'rel',
|
||||
),
|
||||
'foobar' => array(
|
||||
'predicates' => array('foo:bar'),
|
||||
),
|
||||
'foobar1' => array(
|
||||
'datatype' => 'foo:bar1type',
|
||||
'predicates' => array('foo:bar1'),
|
||||
),
|
||||
'foobar_objproperty1' => array(
|
||||
'predicates' => array('sioc:has_creator', 'dc:creator'),
|
||||
'type' => 'rel',
|
||||
),
|
||||
'foobar_objproperty2' => array(
|
||||
'predicates' => array('sioc:reply_of'),
|
||||
'type' => 'rev',
|
||||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'type' => 'node',
|
||||
'bundle' => 'blog',
|
||||
'mapping' => array(
|
||||
'rdftype' => array('sioct:Weblog'),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_rdf_namespaces().
|
||||
*/
|
||||
function rdf_test_rdf_namespaces() {
|
||||
return array(
|
||||
'dc' => 'http://purl.org/conflicting/namespace',
|
||||
'foaf' => 'http://xmlns.com/foaf/0.1/',
|
||||
'foaf1' => 'http://xmlns.com/foaf/0.1/',
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue