diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockTestBase.php b/core/modules/block/lib/Drupal/block/Tests/BlockTestBase.php index dd6a5a5..7a10c8a 100644 --- a/core/modules/block/lib/Drupal/block/Tests/BlockTestBase.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockTestBase.php @@ -68,7 +68,7 @@ function setUp() { ); $block_storage = $this->container->get('entity.manager')->getStorageController('block'); - $blocks = $block_storage->loadByProperties(array('theme' => variable_get('theme_default', 'stark'))); + $blocks = $block_storage->loadByProperties(array('theme' => \Drupal::config('system.theme')->get('default'))); foreach ($blocks as $block) { $block->delete(); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php index 962213a..f32a14c 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php @@ -85,33 +85,6 @@ public function blockSubmit($form, &$form_state) { } /** - * Generates a views block instance ID. - * - * @param \Drupal\Core\Config\Entity\Query\Query $entity_query - * The entity query for a block. - * - * @return string - * The new block instance ID. - */ - public function generateBlockInstanceID(Query $entity_query) { - $original_id = 'views_block__' . $this->view->storage->id() . '_' . $this->view->current_display; - - // Get an array of block IDs. - $block_ids = $entity_query->execute(); - - // Iterate through potential IDs until we get a new one. E.g. - // 'views_block__MYVIEW_PAGE_1_2' - $count = 1; - $id = $original_id; - while (in_array($id, $block_ids)) { - $id = $original_id . '_' . ++$count; - } - - return $id; - } - - - /** * {@inheritdoc} */ public function getMachineNameSuggestion() { diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php index c759da0..33e0b72 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php @@ -120,11 +120,11 @@ public function testExposedBlock() { $this->drupalGet('test_exposed_block'); // Test there is an exposed form in a block. - $xpath = $this->buildXPathQuery('//div[@id=:id]/div/form/@id', array(':id' => drupal_html_class('block-' . $block->id()))); + $xpath = $this->buildXPathQuery('//div[@id=:id]/div/form/@id', array(':id' => drupal_html_id('block-' . $block->id()))); $this->assertFieldByXpath($xpath, $this->getExpectedExposedFormId($view), 'Expected form found in views block.'); // Test there is not an exposed form in the view page content area. - $xpath = $this->buildXPathQuery('//div[@class="view-content"]/form/@id', array(':id' => drupal_html_class('block-' . $block->id()))); + $xpath = $this->buildXPathQuery('//div[@class="view-content"]/form/@id', array(':id' => drupal_html_id('block-' . $block->id()))); $this->assertNoFieldByXpath($xpath, $this->getExpectedExposedFormId($view), 'No exposed form found in views content region.'); // Test there is only one views exposed form on the page.