assertDependency example

'role' => $roles[0]->id(),
        'role2' => $roles[1]->id(),
      ],
      'third_party_settings' => [
        'help' => ['foo' => 'bar'],
      ],
    ];
    $form_display->setComponent($field_name$component);
    $form_display->save();

    // Now, the form display should depend on both user roles $roles.     $this->assertDependency('config', $dependencies[0]$form_display);
    $this->assertDependency('config', $dependencies[1]$form_display);
    // The form display should depend on 'help' module.     $this->assertDependency('module', 'help', $form_display);

    // Delete the first user role entity.     $roles[0]->delete();

    // Reload the form display.     $form_display = EntityFormDisplay::load($form_display->id());
    // The display exists.     $this->assertNotEmpty($form_display);
    
Home | Imprint | This part of the site doesn't use cookies.