function RelationTestCase::saveRelation in Relation 7
Saves a relation.
5 calls to RelationTestCase::saveRelation()
- RelationDummyFieldTestCase::testDummyFieldXSS in relation_dummy_field/
tests/ relation_dummy_field.test - Verify that the dummy field protects against XSS attacks.
- RelationTestCase::createRelationDirectional in tests/
relation.test - Creates a Directional relation.
- RelationTestCase::createRelationOctopus in tests/
relation.test - Creates an Octopus (4-ary) relation.
- RelationTestCase::createRelationSymmetric in tests/
relation.test - Creates a Symmetric relation.
- RelationTestCase::createRelationUnary in tests/
relation.test - Creates an Unary relation.
File
- tests/
relation.test, line 213 - Tests for Relation module.
Class
- RelationTestCase
- Relation helper class.
Code
function saveRelation($relation_type, $endpoints) {
$relation = relation_create($relation_type, $endpoints);
$rid = relation_save($relation);
if ($this->sleep) {
sleep(1);
}
return $rid;
}