public function BreadcrumbTest::setUp in Entity Reference Hierarchy 3.x
Same name and namespace in other branches
- 8.2 modules/entity_hierarchy_breadcrumb/tests/src/Kernel/BreadcrumbTest.php \Drupal\Tests\entity_hierarchy_breadcrumb\Kernel\BreadcrumbTest::setUp()
Overrides EntityHierarchyKernelTestBase::setUp
File
- modules/
entity_hierarchy_breadcrumb/ tests/ src/ Kernel/ BreadcrumbTest.php, line 46
Class
- BreadcrumbTest
- Tests for breadcrumbs built of entity hierarchy fields.
Namespace
Drupal\Tests\entity_hierarchy_breadcrumb\KernelCode
public function setUp() {
parent::setUp();
$user = $this
->createUser([], [
'view test entity',
]);
$this->container
->get('account_switcher')
->switchTo($user);
$this->breadcrumbBuilder = $this->container
->get('entity_hierarchy.breadcrumb');
$this->testRoute = new Route('/entity_test/{entity_test}', [], [], [
'parameters' => [
static::ENTITY_TYPE => [
'type' => 'entity:' . static::ENTITY_TYPE,
],
],
]);
}