Skip to content
Snippets Groups Projects
Commit 11ffad24 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2780703 by chx: Improve context variable names in Block UI test

parent ffe7d13a
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -230,7 +230,7 @@ public function testContextAwareBlocks() {
$this->assertTrue(!empty($definition), 'The context-aware test block exists.');
$edit = [
'region' => 'content',
'settings[context_mapping][user]' => '@block_test.multiple_static_context:user2',
'settings[context_mapping][user]' => '@block_test.multiple_static_context:userB',
];
$this->drupalPostForm($block_url, $edit, 'Save block');
......
......@@ -47,9 +47,9 @@ public function __construct(AccountInterface $account, EntityManagerInterface $e
public function getRuntimeContexts(array $unqualified_context_ids) {
$current_user = $this->userStorage->load($this->account->id());
$context1 = new Context(new ContextDefinition('entity:user', 'User 1'), $current_user);
$context1 = new Context(new ContextDefinition('entity:user', 'User A'), $current_user);
$context2 = new Context(new ContextDefinition('entity:user', 'User 2'), $current_user);
$context2 = new Context(new ContextDefinition('entity:user', 'User B'), $current_user);
$cacheability = new CacheableMetadata();
$cacheability->setCacheContexts(['user']);
......@@ -58,8 +58,8 @@ public function getRuntimeContexts(array $unqualified_context_ids) {
$context2->addCacheableDependency($cacheability);
return [
'user1' => $context1,
'user2' => $context2,
'userA' => $context1,
'userB' => $context2,
];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment