You are here

function ServicesResourceTaxonomyTests::testTermDelete in Services 7.3

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

Test taxonomy term delete method.

File

tests/functional/ServicesResourceTaxonomyTests.test, line 486
Call the endpoint tests when no authentication is being used.

Class

ServicesResourceTaxonomyTests
Taxonomy resource test class.

Code

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