You are here

function sharethis_block_test_install in Sharethis block 8

Implements hook_install().

Throws

EntityStorageException

File

tests/modules/responsive_menu_test/sharethis_block_test.install, line 11

Code

function sharethis_block_test_install() {
  $values = [
    'id' => 'sharethis',
    'plugin' => 'sharethis',
    'region' => 'content',
    'settings' => [
      'label' => '',
    ],
    'theme' => 'stark',
    'visibility' => [],
    'weight' => 0,
  ];
  $block = Block::create($values);
  $block
    ->save();
  $config_factory = \Drupal::configFactory();
  $config = $config_factory
    ->getEditable('sharethis_block.configuration');
  $config
    ->set('sharethis_property', '5ece0df09d73fe001243be34')
    ->set('sharethis_inline', 1)
    ->save();
}