You are here

function ServicesResourceTaxonomyTests::testTermDelete in Services 6.3

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

Test taxonomy term delete method.

File

tests/functional/ServicesResourceTaxonomyTests.test, line 365

Class

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

Code

function testTermDelete() {
  $path = $this->endpoint->path;
  $vocabulary = $this
    ->createVocabulary();
  $term = $this
    ->createTerm($vocabulary['vid']);
  $this
    ->servicesDelete($path . '/taxonomy_term/' . $term['tid']);
  $term_load = taxonomy_get_term($term['tid'], TRUE);
  $this
    ->assertTrue(empty($term_load), t('Taxonomy term deleted properly.'), 'TaxonomyTermResource: Delete');
}