/**
* Provides a confirmation form for deleting a content block entity.
*
* @internal
*/ classBlockContentDeleteFormextends ContentEntityDeleteForm {
/**
* {@inheritdoc}
*/ publicfunctiongetDescription(){ $instances = $this->entity->getInstances(); if(!empty($instances)){ return$this->formatPlural(count($instances), 'This will also remove 1 placed block instance. This action cannot be undone.', 'This will also remove @count placed block instances. This action cannot be undone.'); } return parent::getDescription(); }
// Delete the block.
$this->drupalGet('admin/content/block/1/delete'); $this->assertSession()->pageTextContains('This will also remove 1 placed block instance.');