Commit 11ffad24 authored by alexpott's avatar alexpott

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

parent ffe7d13a
......@@ -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,
];
}
......
Markdown is supported
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