Unverified Commit bfe3f5dc authored by Lauri Timmanee's avatar Lauri Timmanee
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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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:
+13 −0
Original line number Diff line number Diff line
@@ -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
    );
  }

}
+5 −0
Original line number Diff line number Diff line
@@ -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