You are here

function ServicesResourceTaxonomyTests::testVocabularyRetrieve in Services 6.3

Same name and namespace in other branches
  1. 7.3 tests/functional/ServicesResourceTaxonomyTests.test \ServicesResourceTaxonomyTests::testVocabularyRetrieve()

Test taxonomy vocabulry retrieve method.

File

tests/functional/ServicesResourceTaxonomyTests.test, line 112

Class

ServicesResourceTaxonomyTests
Run test cases for the endpoint with no authentication turned on.

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, t('Taxonomy vocabulary retrieved properly.'), 'TaxonomyVocabularyResource: Retrieve');
}