3 namespace Drupal\Tests\views_ui\Functional;
5 use Drupal\language\Entity\ConfigurableLanguage;
6 use Drupal\views\Views;
9 * Tests the UI of storage properties of views.
13 class StorageTest extends UITestBase {
16 * Views used by this test.
20 public static $testViews = ['test_view'];
27 public static $modules = ['views_ui', 'language'];
30 * Tests changing label, description and tag.
32 * @see views_ui_edit_details_form
34 public function testDetails() {
35 $view_name = 'test_view';
37 ConfigurableLanguage::createFromLangcode('fr')->save();
40 'label' => $this->randomMachineName(),
41 'tag' => $this->randomMachineName(),
42 'description' => $this->randomMachineName(30),
46 $this->drupalPostForm("admin/structure/views/nojs/edit-details/$view_name/default", $edit, t('Apply'));
47 $this->drupalPostForm(NULL, [], t('Save'));
49 $view = Views::getView($view_name);
51 foreach (['label', 'tag', 'description', 'langcode'] as $property) {
52 $this->assertEqual($view->storage->get($property), $edit[$property], format_string('Make sure the property @property got probably saved.', ['@property' => $property]));