Commit 63603999 authored by webchick's avatar webchick

Issue #2086447 by tim.plunkett, damiankloip: Remove 'View:' prefix from views...

Issue #2086447 by tim.plunkett, damiankloip: Remove 'View:' prefix from views block derivative admin labels.
parent b9a4a7ce
......@@ -69,7 +69,7 @@ public function testBlockCategory() {
':id' => 'edit-views-test-data',
':li_class' => 'views-block' . drupal_html_class($edit['id']) . '-block-1',
':href' => url('admin/structure/block/add/views_block:' . $edit['id'] . '-block_1/stark'),
':text' => 'View: ' . $edit['label'],
':text' => $edit['label'],
);
$this->drupalGet('admin/structure/block');
$elements = $this->xpath('//details[@id=:id]//li[contains(@class, :li_class)]/a[contains(@href, :href) and text()=:text]', $arguments);
......@@ -105,7 +105,7 @@ public function testBlockCategory() {
':id' => 'edit-views-test-data',
':li_class' => 'views-block' . drupal_html_class($edit['id']) . '-block-2',
':href' => url('admin/structure/block/add/views_block:' . $edit['id'] . '-block_2/stark'),
':text' => 'View: ' . $edit['label'],
':text' => $edit['label'],
);
$elements = $this->xpath('//details[@id=:id]//li[contains(@class, :li_class)]/a[contains(@href, :href) and text()=:text]', $arguments);
$this->assertTrue(!empty($elements), 'The first cloned test block remains in the original category.');
......@@ -114,7 +114,7 @@ public function testBlockCategory() {
':id' => $category_id,
':li_class' => 'views-block' . drupal_html_class($edit['id']) . '-block-3',
':href' => url('admin/structure/block/add/views_block:' . $edit['id'] . '-block_3/stark'),
':text' => 'View: ' . $edit['label'],
':text' => $edit['label'],
);
$elements = $this->xpath('//details[@id=:id]//li[contains(@class, :li_class)]/a[contains(@href, :href) and text()=:text]', $arguments);
$this->assertTrue(!empty($elements), 'The second cloned test block appears in the custom category.');
......
......@@ -93,10 +93,10 @@ public function getDerivativeDefinitions(array $base_plugin_definition) {
if (empty($desc)) {
if ($display->display['display_title'] == $display->definition['title']) {
$desc = t('View: !view', array('!view' => $view->label()));
$desc = t('!view', array('!view' => $view->label()));
}
else {
$desc = t('View: !view: !display', array('!view' => $view->label(), '!display' => $display->display['display_title']));
$desc = t('!view: !display', array('!view' => $view->label(), '!display' => $display->display['display_title']));
}
}
$this->derivatives[$delta] = array(
......
......@@ -45,7 +45,7 @@ function testViewsWizardAndListing() {
// This view should not have a block.
$this->drupalGet('admin/structure/block');
$this->assertNoText('View: ' . $view1['label']);
$this->assertNoText($view1['label']);
// Create two nodes.
$node1 = $this->drupalCreateNode(array('type' => 'page'));
......@@ -123,7 +123,7 @@ function testViewsWizardAndListing() {
// Confirm that the block is available in the block administration UI.
$this->drupalGet('admin/structure/block/list/' . \Drupal::config('system.theme')->get('default'));
$this->assertText('View: ' . $view3['label']);
$this->assertText($view3['label']);
// Place the block.
$this->drupalPlaceBlock("views_block:{$view3['id']}-block_1");
......
......@@ -76,7 +76,7 @@ function testItemsPerPage() {
// Confirm that the block is listed in the block administration UI.
$this->drupalGet('admin/structure/block/list/' . \Drupal::config('system.theme')->get('default'));
$this->assertText('View: ' . $view['label']);
$this->assertText($view['label']);
// Place the block, visit a page that displays the block, and check that the
// nodes we expect appear in the correct order.
......
......@@ -55,7 +55,7 @@ function testOverrideDisplays() {
// Confirm that the view block is available in the block administration UI.
$this->drupalGet('admin/structure/block/list/' . \Drupal::config('system.theme')->get('default'));
$this->assertText('View: ' . $view['label']);
$this->assertText($view['label']);
// Place the block.
$this->drupalPlaceBlock("views_block:{$view['id']}-block_1");
......@@ -113,7 +113,7 @@ function testWizardMixedDefaultOverriddenDisplays() {
// Confirm that the block is available in the block administration UI.
$this->drupalGet('admin/structure/block/list/' . \Drupal::config('system.theme')->get('default'));
$this->assertText('View: ' . $view['label']);
$this->assertText($view['label']);
// Put the block into the first sidebar region, and make sure it will not
// display on the view's page display (since we will be searching for the
......
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