Unverified Commit bfe3f5dc authored by Lauri Eskola's avatar Lauri Eskola
Browse files

Issue #3333569 by alorenc, lauriii, smustgrave, larowlan: Breadcrumb for local...

Issue #3333569 by alorenc, lauriii, smustgrave, larowlan: Breadcrumb for local tasks of Custom Blocks should contain the name of the custom block not the entity ID
parent 89eb5575
......@@ -22,6 +22,7 @@ entity.block_content.canonical:
path: '/block/{block_content}'
defaults:
_entity_form: 'block_content.edit'
_title_callback: '\Drupal\Core\Entity\Controller\EntityController::title'
options:
_admin_route: TRUE
requirements:
......
......@@ -3,6 +3,7 @@
namespace Drupal\Tests\block_content\Functional;
use Drupal\block_content\Entity\BlockContent;
use Drupal\Tests\system\Functional\Menu\AssertBreadcrumbTrait;
/**
* Create a block and test block edit functionality.
......@@ -11,6 +12,8 @@
*/
class PageEditTest extends BlockContentTestBase {
use AssertBreadcrumbTrait;
/**
* {@inheritdoc}
*/
......@@ -23,6 +26,7 @@ protected function setUp(): void {
parent::setUp();
$this->drupalPlaceBlock('page_title_block');
$this->drupalPlaceBlock('system_breadcrumb_block');
}
/**
......@@ -77,6 +81,15 @@ public function testPageEdit() {
$this->drupalGet("block/" . $revised_block->id());
$this->clickLink('Delete');
$this->assertSession()->pageTextContains('Are you sure you want to delete the custom block ' . $revised_block->label() . '?');
// Test breadcrumb.
$trail = [
'' => 'Home',
'block/' . $revised_block->id() => $revised_block->label(),
];
$this->assertBreadcrumb(
'block/' . $revised_block->id() . '/delete', $trail
);
}
}
......@@ -2175,6 +2175,11 @@ parameters:
count: 2
path: modules/system/tests/modules/entity_test/entity_test.install
-
message: "#^Variable \\$goto in isset\\(\\) always exists and is not nullable\\.$#"
count: 1
path: modules/system/tests/src/Functional/Menu/AssertBreadcrumbTrait.php
-
message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
count: 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment