function ServicesResourceTaxonomyTests::testVocabularyUpdateLegacy in Services 6.3
Same name and namespace in other branches
- 7.3 tests/functional/ServicesResourceTaxonomyTests.test \ServicesResourceTaxonomyTests::testVocabularyUpdateLegacy()
Test taxonomy vocabulary update (Legacy).
TODO: To be removed in future version.
See also
http://drupal.org/node/1083242
File
- tests/
functional/ ServicesResourceTaxonomyTests.test, line 152
Class
- ServicesResourceTaxonomyTests
- Run test cases for the endpoint with no authentication turned on.
Code
function testVocabularyUpdateLegacy() {
$path = $this->endpoint->path;
$vocabulary = $this
->createVocabulary();
$vid = $vocabulary['vid'];
$vocabulary['name'] = $this
->randomName();
$vocabulary['description'] = $this
->randomString();
$response = $this
->servicesPUT($path . '/taxonomy_vocabulary/' . $vid, array(
'vocabulary' => $vocabulary,
));
$vocabulary_load = (array) taxonomy_vocabulary_load($vid, TRUE);
$vocabulary_intersect = array_intersect_assoc($vocabulary, $vocabulary_load);
$this
->assertEqual($vocabulary, $vocabulary_intersect, t('Taxonomy vocabulary updated properly.'), 'TaxonomyVocabularyResource: Update (Legacy)');
}