assertParentsUnchanged example

      $term_5->id(),
      $term_4->id(),
    ]);
    $this->drupalGet($term_6->toUrl('edit-form'));
    $this->assertParentOption('<root>');
    $this->assertParentOption('Test term 1');
    $this->assertParentOption('-Test term 3');
    $this->assertParentOption('--Test term 5', TRUE);
    $this->assertParentOption('Test term 2');
    $this->assertParentOption('-Test term 4', TRUE);
    $this->submitForm([], 'Save');
    $this->assertParentsUnchanged($term_6);
  }

  /** * Tests specifying parents when creating terms and a disabled parent form. */
  public function testEditingParentsWithDisabledFormElement() {
    // Disable the parent form element.     $this->state->set('taxonomy_test.disable_parent_form_element', TRUE);
    $this->drupalGet("/admin/structure/taxonomy/manage/{$this->vocabularyId}/add");
    $this->assertSession()->fieldDisabled('Parent terms');

    
Home | Imprint | This part of the site doesn't use cookies.