function ServicesResourceTaxonomyTests::testVocabularyRetrieve in Services 7.3
Same name and namespace in other branches
- 6.3 tests/functional/ServicesResourceTaxonomyTests.test \ServicesResourceTaxonomyTests::testVocabularyRetrieve()
Test taxonomy vocabulry retrieve method.
File
- tests/
functional/ ServicesResourceTaxonomyTests.test, line 200 - Call the endpoint tests when no authentication is being used.
Class
- ServicesResourceTaxonomyTests
- Taxonomy resource test class.
Code
function testVocabularyRetrieve() {
$path = $this->endpoint->path;
$vocabulary = $this
->createVocabulary();
$vid = $vocabulary['vid'];
$response = $this
->servicesGet($path . '/taxonomy_vocabulary/' . $vid);
$vocabulary_retrieve = (array) $response['body'];
$vocabulary_intersect = array_intersect_assoc($vocabulary, $vocabulary_retrieve);
$this
->assertEqual($vocabulary, $vocabulary_intersect, 'Taxonomy vocabulary retrieved properly.', 'TaxonomyVocabularyResource: Retrieve');
}