protected function MemberCountBlockTest::updateBlockSetting in Organic groups 8
Updates the given setting in the block with the given value.
Parameters
string $setting: The setting to update.
mixed $value: The value to set.
Throws
\Drupal\Core\Entity\EntityStorageException Thrown when the updated block cannot be saved.
1 call to MemberCountBlockTest::updateBlockSetting()
- MemberCountBlockTest::testMemberCountBlock in tests/
src/ Kernel/ Plugin/ Block/ MemberCountBlockTest.php - Tests the member count block.
File
- tests/
src/ Kernel/ Plugin/ Block/ MemberCountBlockTest.php, line 309
Class
- MemberCountBlockTest
- Tests the member count block.
Namespace
Drupal\Tests\og\Kernel\Plugin\BlockCode
protected function updateBlockSetting($setting, $value) {
$settings = $this->block
->get('settings');
$settings[$setting] = $value;
$this->block
->set('settings', $settings)
->save();
}