protected function RestWSTestCase::createTerm in RESTful Web Services 7.2
Creates a term.
2 calls to RestWSTestCase::createTerm()
- RestWSTestCase::testQuerying in ./
restws.test - Tests resource querying.
- RestWSTestCase::testResourceArray in ./
restws.test - Test entity references with an array which contains id, entity type.
File
- ./
restws.test, line 566 - RESTful web services tests.
Class
- RestWSTestCase
- @file RESTful web services tests.
Code
protected function createTerm($term_name) {
$term = new stdClass();
$term->name = $term_name;
$term->vid = 1;
taxonomy_term_save($term);
}