diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermsIndentation.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermsIndentation.php new file mode 100644 index 0000000..d97b119 --- /dev/null +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermsIndentation.php @@ -0,0 +1,44 @@ + 'Taxonomy Terms Indentation', + 'description' => 'Ensure that the terms indentation works properly', + 'group' => 'Taxonomy', + ); + } + public function setUp() { + parent::setUp(); + $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'bypass node access')); + $this->drupalLogin($this->admin_user); + $this->vocabulary = $this->createVocabulary(); + } + function testTermIndentation() { + $term1 = $this->createTerm($this->vocabulary); + $term2 = $this->createTerm($this->vocabulary); + $term3 = $this->createTerm($this->vocabulary); + $edit = array( + //'terms[tid:1:0][term][tid]' => 1, + //'terms[tid:1:0][term][parent]' => '', + //'terms[tid:1:0][term][depth]' => 0, + //'terms[tid:1:0][weight]' => 0, + 'terms[tid:' . $term2->id() . ':0][term][tid]' => 2, + 'terms[tid:' . $term2->id() . ':0][term][parent]' => 1, + 'terms[tid:' . $term2->id() . ':0][term][depth]' => 1, + 'terms[tid:' . $term2->id() . ':0][weight]' => 1, + //'terms[tid:3:0][term][tid]' => 3, + //'terms[tid:3:0][term][parent]' => 2, + //'terms[tid:3:0][term][depth]' => 2, + //'terms[tid:3:0][weight]' => 2, + ); + $this->drupalPost('admin/structure/taxonomy/manage/' . $this->vocabulary->get('vid'), $edit, t('Save')); + $this->assertPattern('|