function ServicesResourceTaxonomyTests::testTermRetrieve in Services 7.3
Same name and namespace in other branches
- 6.3 tests/functional/ServicesResourceTaxonomyTests.test \ServicesResourceTaxonomyTests::testTermRetrieve()
Test taxonomy term retrieve method.
File
- tests/
functional/ ServicesResourceTaxonomyTests.test, line 422 - Call the endpoint tests when no authentication is being used.
Class
- ServicesResourceTaxonomyTests
- Taxonomy resource test class.
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, 'Taxonomy term retrieved properly.', 'TaxonomyTermResource: Retrieve');
}