function ServicesResourceTaxonomyTests::testTermRetrieve in Services 6.3
Same name and namespace in other branches
- 7.3 tests/functional/ServicesResourceTaxonomyTests.test \ServicesResourceTaxonomyTests::testTermRetrieve()
Test taxonomy term retrieve method.
File
- tests/
functional/ ServicesResourceTaxonomyTests.test, line 301
Class
- ServicesResourceTaxonomyTests
- Run test cases for the endpoint with no authentication turned on.
Code
function testTermRetrieve() {
$path = $this->endpoint->path;
$vocabulary = $this
->createVocabulary();
$term = $this
->createTerm($vocabulary['vid']);
$response = $this
->servicesGet($path . '/taxonomy_term/' . $term['tid']);
$term_retrieve = (array) $response['body'];
$this
->assertEqual($term_retrieve, $term, t('Taxonomy term retrieved properly.'), 'TaxonomyTermResource: Retrieve');
}