Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -226,7 +226,11 @@ function views_ui_standard_display_dropdown(&$form, FormStateInterface $form_sta
|
|||
$form['progress']['#weight'] = -1001;
|
||||
}
|
||||
|
||||
if ($current_display->isDefaultDisplay()) {
|
||||
// The dropdown should not be added when :
|
||||
// - this is the default display.
|
||||
// - there is no master shown and just one additional display (mostly page)
|
||||
// and the current display is defaulted.
|
||||
if ($current_display->isDefaultDisplay() || ($current_display->isDefaulted($section) && !\Drupal::config('views.settings')->get('ui.show.master_display') && count($displays) <= 2)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 313 B |
Binary file not shown.
Before Width: | Height: | Size: 227 B |
Binary file not shown.
Before Width: | Height: | Size: 228 B |
Binary file not shown.
Before Width: | Height: | Size: 6.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 175 B |
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB |
|
@ -797,7 +797,7 @@
|
|||
newRow = $('<tr class="filter-group-operator-row"><td colspan="5"></td></tr>');
|
||||
newRow.find('td').append(fakeOperator);
|
||||
newRow.insertBefore(titleRow);
|
||||
dropdowns = dropdowns.add(fakeOperator);
|
||||
dropdowns.add(fakeOperator);
|
||||
}
|
||||
|
||||
return dropdowns;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Ajax\SetFormCommand.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Ajax;
|
||||
|
||||
use Drupal\Core\Ajax\CommandInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Controller\ViewsUIController.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Controller;
|
||||
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\AdvancedSettingsForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form;
|
||||
|
||||
use Drupal\Core\Form\ConfigFormBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\Ajax\AddHandler.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form\Ajax;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\Ajax\Analyze.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form\Ajax;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\Ajax\ConfigHandler.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form\Ajax;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Url;
|
||||
use Drupal\views\ViewEntityInterface;
|
||||
use Drupal\views\ViewExecutable;
|
||||
use Drupal\views\Views;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\Ajax\ConfigHandlerExtra.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form\Ajax;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\Ajax\ConfigHandlerGroup.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form\Ajax;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\Ajax\Display.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form\Ajax;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\Ajax\EditDetails.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form\Ajax;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\Ajax\Rearrange.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form\Ajax;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\Ajax\RearrangeFilter.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form\Ajax;
|
||||
|
||||
use Drupal\Component\Utility\Html;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\Ajax\ReorderDisplays.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form\Ajax;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\Ajax\ViewsFormBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form\Ajax;
|
||||
|
||||
use Drupal\Component\Utility\Html;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\Ajax\ViewsFormInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form\Ajax;
|
||||
|
||||
use Drupal\Core\Form\FormInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\BasicSettingsForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form;
|
||||
|
||||
use Drupal\Core\Config\ConfigFactoryInterface;
|
||||
|
@ -134,8 +129,19 @@ class BasicSettingsForm extends ConfigFormBase {
|
|||
),
|
||||
);
|
||||
|
||||
$form['live_preview']['options']['ui_show_sql_query_enabled'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#title' => $this->t('Show the SQL query'),
|
||||
'#default_value' => $config->get('ui.show.sql_query.enabled'),
|
||||
);
|
||||
|
||||
$form['live_preview']['options']['ui_show_sql_query_where'] = array(
|
||||
'#type' => 'radios',
|
||||
'#states' => array(
|
||||
'visible' => array(
|
||||
':input[name="ui_show_sql_query_enabled"]' => array('checked' => TRUE),
|
||||
),
|
||||
),
|
||||
'#title' => t('Show SQL query'),
|
||||
'#options' => array(
|
||||
'above' => $this->t('Above the preview'),
|
||||
|
@ -144,11 +150,6 @@ class BasicSettingsForm extends ConfigFormBase {
|
|||
'#default_value' => $config->get('ui.show.sql_query.where'),
|
||||
);
|
||||
|
||||
$form['live_preview']['options']['ui_show_sql_query_enabled'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#title' => $this->t('Show the SQL query'),
|
||||
'#default_value' => $config->get('ui.show.sql_query.enabled'),
|
||||
);
|
||||
$form['live_preview']['options']['ui_show_performance_statistics'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#title' => $this->t('Show performance statistics'),
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Form\BreakLockForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Form;
|
||||
|
||||
use Drupal\Core\Entity\EntityConfirmFormBase;
|
||||
|
|
5
core/modules/views_ui/src/ParamConverter/ViewUIConverter.php
Executable file → Normal file
5
core/modules/views_ui/src/ParamConverter/ViewUIConverter.php
Executable file → Normal file
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\ParamConverter\ViewUIConverter.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\ParamConverter;
|
||||
|
||||
use Drupal\Core\Config\ConfigFactoryInterface;
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\ProxyClass\ParamConverter\ViewUIConverter.
|
||||
*/
|
||||
// @codingStandardsIgnoreFile
|
||||
|
||||
/**
|
||||
* This file was generated via php core/scripts/generate-proxy-class.php 'Drupal\views_ui\ParamConverter\ViewUIConverter' "core/modules/views_ui/src".
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\AnalyzeTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Tests\ViewTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\AreaEntityUITest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\block\Entity\Block;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\ArgumentValidatorTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Views;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\CachedDataUITest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\CustomBooleanTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\DefaultViewsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\Core\Url;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\DisplayAttachmentTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Views;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\DisplayCRUDTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Views;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\DisplayExtenderUITest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Views;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\DisplayFeedTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\DisplayPathTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
use Drupal\Core\Menu\MenuTreeParameters;
|
||||
use Drupal\menu_link_content\Entity\MenuLinkContent;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\DisplayTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\Component\Serialization\Json;
|
||||
|
@ -182,7 +177,7 @@ class DisplayTest extends UITestBase {
|
|||
// The form redirects to the master display.
|
||||
$this->drupalGet($path);
|
||||
|
||||
$this->assertLink(t('Custom URL'), 0, 'The link option has custom url as summary.');
|
||||
$this->assertLink(t('Custom URL'), 0, 'The link option has custom URL as summary.');
|
||||
|
||||
// Test the default link_url value for new display
|
||||
$this->drupalPostForm(NULL, array(), t('Add Block'));
|
||||
|
@ -305,4 +300,32 @@ class DisplayTest extends UITestBase {
|
|||
$this->assertNoRaw($display_title);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that the override option is hidden when it's not needed.
|
||||
*/
|
||||
public function testHideDisplayOverride() {
|
||||
// Test that the override option appears with two displays.
|
||||
$this->drupalGet('admin/structure/views/nojs/handler/test_display/page_1/field/title');
|
||||
$this->assertText('All displays');
|
||||
|
||||
// Remove a display and test if the override option is hidden.
|
||||
$this->drupalPostForm('admin/structure/views/view/test_display/edit/block_1', [], t('Delete @display', ['@display' => 'Block']));
|
||||
$this->drupalPostForm(NULL, [], t('Save'));
|
||||
|
||||
$this->drupalGet('admin/structure/views/nojs/handler/test_display/page_1/field/title');
|
||||
$this->assertNoText('All displays');
|
||||
|
||||
// Test that the override option is shown when display master is on.
|
||||
\Drupal::configFactory()->getEditable('views.settings')->set('ui.show.master_display', TRUE)->save();
|
||||
$this->drupalGet('admin/structure/views/nojs/handler/test_display/page_1/field/title');
|
||||
$this->assertText('All displays');
|
||||
|
||||
// Test that the override option is shown if the current display is
|
||||
// overridden so that the option to revert is available.
|
||||
$this->drupalPostForm(NULL, ['override[dropdown]' => 'page_1'], t('Apply'));
|
||||
\Drupal::configFactory()->getEditable('views.settings')->set('ui.show.master_display', FALSE)->save();
|
||||
$this->drupalGet('admin/structure/views/nojs/handler/test_display/page_1/field/title');
|
||||
$this->assertText('Revert to default');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\DuplicateTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\ExposedFormUITest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Entity\View;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\FieldUITest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Views;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\FilterBooleanWebTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\FilterNumericWebTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\config\Tests\SchemaCheckTestTrait;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\FilterUITest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Tests\ViewTestBase;
|
||||
|
@ -72,7 +67,7 @@ class FilterUITest extends ViewTestBase {
|
|||
|
||||
$this->drupalGet('admin/structure/views/view/test_filter_groups');
|
||||
|
||||
$this->assertLink('Content: Node ID (= 1)', 0, 'Content: Node ID (= 1) link appears correctly.');
|
||||
$this->assertLink('Content: ID (= 1)', 0, 'Content: ID (= 1) link appears correctly.');
|
||||
|
||||
// Tests that we can create a new filter group from UI.
|
||||
$this->drupalGet('admin/structure/views/nojs/rearrange-filter/test_filter_groups/page');
|
||||
|
@ -95,4 +90,33 @@ class FilterUITest extends ViewTestBase {
|
|||
$this->assertNoRaw('<span>Group 3</span>', 'Group 3 has not been added yet.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the identifier settings and restrictions.
|
||||
*/
|
||||
public function testFilterIdentifier() {
|
||||
$admin_user = $this->drupalCreateUser(array('administer views', 'administer site configuration'));
|
||||
$this->drupalLogin($admin_user);
|
||||
$path = 'admin/structure/views/nojs/handler/test_filter_in_operator_ui/default/filter/type';
|
||||
|
||||
// Set an empty identifier.
|
||||
$edit = array(
|
||||
'options[expose][identifier]' => '',
|
||||
);
|
||||
$this->drupalPostForm($path, $edit, t('Apply'));
|
||||
$this->assertText('The identifier is required if the filter is exposed.');
|
||||
|
||||
// Set the identifier to 'value'.
|
||||
$edit = array(
|
||||
'options[expose][identifier]' => 'value',
|
||||
);
|
||||
$this->drupalPostForm($path, $edit, t('Apply'));
|
||||
$this->assertText('This identifier is not allowed.');
|
||||
|
||||
// Set the identifier to a value with a restricted character.
|
||||
$edit = array(
|
||||
'options[expose][identifier]' => 'value value',
|
||||
);
|
||||
$this->drupalPostForm($path, $edit, t('Apply'));
|
||||
$this->assertText('This identifier has illegal characters.');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\GroupByTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\HandlerTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
|
@ -245,9 +240,9 @@ class HandlerTest extends UITestBase {
|
|||
$add_handler_url = 'admin/structure/views/nojs/add-handler/test_node_view/default/' . $handler_type;
|
||||
$this->drupalGet($add_handler_url);
|
||||
|
||||
$this->assertNoDuplicateField('Node ID', 'Content');
|
||||
$this->assertNoDuplicateField('Node ID', 'Content revision');
|
||||
$this->assertNoDuplicateField('Type', 'Content');
|
||||
$this->assertNoDuplicateField('ID', 'Content');
|
||||
$this->assertNoDuplicateField('ID', 'Content revision');
|
||||
$this->assertNoDuplicateField('Content type', 'Content');
|
||||
$this->assertNoDuplicateField('UUID', 'Content');
|
||||
$this->assertNoDuplicateField('Revision ID', 'Content');
|
||||
$this->assertNoDuplicateField('Revision ID', 'Content revision');
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\NewViewConfigSchemaTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\OverrideDisplaysTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\PreviewTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\Component\Serialization\Json;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\QueryTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Views;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\RearrangeFieldsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Views;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\RedirectTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
/**
|
||||
|
@ -44,7 +39,7 @@ class RedirectTest extends UITestBase {
|
|||
|
||||
$this->drupalPostForm($path_edit_path, array('path' => $new_path), t('Apply'));
|
||||
$this->drupalPostForm($edit_path, array(), t('Save'), array('query' => array('destination' => 'test-redirect-view')));
|
||||
$this->assertUrl($new_path, array(), 'Make sure the user got redirected to the expected page after changing the url of a page display.');
|
||||
$this->assertUrl($new_path, array(), 'Make sure the user got redirected to the expected page after changing the URL of a page display.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\ReportFieldsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\field\Entity\FieldConfig;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\ReportTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\RowUITest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\Core\Entity\Entity\EntityViewMode;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\SettingsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\StorageTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\language\Entity\ConfigurableLanguage;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\StyleTableTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Views;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\StyleUITest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Views;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\TranslatedStringTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\language\Entity\ConfigurableLanguage;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\UITestBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Tests\ViewTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\UnsavedPreviewTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Tests\ViewTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\ViewEditTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\language\Entity\ConfigurableLanguage;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\ViewsListTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\ViewsUITourTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\tour\Tests\TourTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\WizardTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Tests\Wizard\WizardTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\XssTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\ViewAddForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\ViewDuplicateForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\ViewEditForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui;
|
||||
|
||||
use Drupal\Component\Utility\Html;
|
||||
|
@ -15,7 +10,6 @@ use Drupal\Core\Ajax\HtmlCommand;
|
|||
use Drupal\Core\Ajax\ReplaceCommand;
|
||||
use Drupal\Core\Datetime\DateFormatterInterface;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Render\Element;
|
||||
use Drupal\Core\Render\ElementInfoManagerInterface;
|
||||
use Drupal\Core\Url;
|
||||
use Drupal\user\SharedTempStoreFactory;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\ViewFormBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui;
|
||||
|
||||
use Drupal\Core\Entity\EntityForm;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\ViewListBuilder.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui;
|
||||
|
||||
use Drupal\Component\Plugin\PluginManagerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\ViewPreviewForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\ViewUI.
|
||||
*/
|
||||
|
||||
namespace Drupal\views_ui;
|
||||
|
||||
use Drupal\Component\Utility\Html;
|
||||
|
@ -12,7 +7,6 @@ use Drupal\Component\Utility\Timer;
|
|||
use Drupal\Component\Utility\Xss;
|
||||
use Drupal\Core\EventSubscriber\AjaxResponseSubscriber;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Url;
|
||||
use Drupal\views\Views;
|
||||
use Drupal\Core\Entity\EntityStorageInterface;
|
||||
use Drupal\views\ViewExecutable;
|
||||
|
|
|
@ -1,22 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\views_ui\Tests\TagTest.
|
||||
*/
|
||||
namespace Drupal\Tests\views_ui\Kernel;
|
||||
|
||||
namespace Drupal\views_ui\Tests;
|
||||
|
||||
use Drupal\views\Tests\ViewKernelTestBase;
|
||||
use Drupal\Tests\views\Kernel\ViewsKernelTestBase;
|
||||
use Drupal\views_ui\Controller\ViewsUIController;
|
||||
use Drupal\Component\Utility\Html;
|
||||
use Drupal\views\Entity\View;
|
||||
|
||||
/**
|
||||
* Tests the views ui tagging functionality.
|
||||
*
|
||||
* @group views_ui
|
||||
*/
|
||||
class TagTest extends ViewKernelTestBase {
|
||||
class TagTest extends ViewsKernelTestBase {
|
||||
|
||||
/**
|
||||
* Modules to enable.
|
||||
|
@ -37,7 +33,7 @@ class TagTest extends ViewKernelTestBase {
|
|||
$suffix = $i % 2 ? 'odd' : 'even';
|
||||
$tag = 'autocomplete_tag_test_' . $suffix . $this->randomMachineName();
|
||||
$tags[] = $tag;
|
||||
entity_create('view', array('tag' => $tag, 'id' => $this->randomMachineName()))->save();
|
||||
View::create(array('tag' => $tag, 'id' => $this->randomMachineName()))->save();
|
||||
}
|
||||
|
||||
// Make sure just ten results are returns.
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\views_ui\Unit\Form\Ajax\RearrangeFilterTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\views_ui\Unit\Form\Ajax;
|
||||
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
namespace Drupal\Tests\views_ui\Unit;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\Core\DependencyInjection\ContainerBuilder;
|
||||
use Drupal\Core\Entity\EntityInterface;
|
||||
use Drupal\Tests\UnitTestCase;
|
||||
|
@ -168,8 +167,6 @@ class ViewListBuilderTest extends UnitTestCase {
|
|||
$display_paths = $row['data']['path']['data']['#items'];
|
||||
// These values will be escaped by Twig when rendered.
|
||||
$this->assertEquals('/test_page, /<object>malformed_path</object>, /<script>alert("placeholder_page/%")</script>', implode(', ', $display_paths));
|
||||
$this->assertFalse(SafeMarkup::isSafe('/<object>malformed_path</object>'), '/<script>alert("/<object>malformed_path</object> is not marked safe.');
|
||||
$this->assertFalse(SafeMarkup::isSafe('/<script>alert("placeholder_page/%")'), '/<script>alert("/<script>alert("placeholder_page/%") is not marked safe.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\views_ui\Unit\ViewUIObjectTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\views_ui\Unit;
|
||||
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
|
|
Reference in a new issue