Loading core/modules/views/src/Plugin/views/query/Sql.php +0 −7 Original line number Diff line number Diff line Loading @@ -1774,7 +1774,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodSimple', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading @@ -1784,7 +1783,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodDistinct', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading @@ -1794,7 +1792,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodSimple', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading @@ -1804,7 +1801,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodSimple', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading @@ -1814,7 +1810,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodSimple', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading @@ -1824,7 +1819,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodSimple', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading @@ -1834,7 +1828,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodSimple', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading core/modules/views_ui/tests/src/Functional/FieldUITest.php +30 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,17 @@ class FieldUITest extends UITestBase { * * @var array */ public static $testViews = ['test_view']; public static $testViews = [ 'test_view', 'test_aggregate_count', ]; /** * {@inheritdoc} */ protected static $modules = [ 'entity_test', ]; /** * Tests the UI of field handlers. Loading Loading @@ -104,4 +114,23 @@ public function testFieldLabel(): void { $this->assertEquals('', $view->field['title']->options['label'], 'The field label for normal styles are empty.'); } /** * Tests the UI of field aggregation settings. */ public function testFieldAggregationSettings(): void { $edit_handler_url = 'admin/structure/views/nojs/handler-group/test_aggregate_count/default/field/id'; $this->drupalGet($edit_handler_url); $this->submitForm(['options[group_type]' => 'count'], 'Apply'); $this->assertSession() ->pageTextNotContains('The website encountered an unexpected error. Try again later.'); $this->drupalGet($edit_handler_url); $dropdown = $this->getSession()->getPage()->find('named', ['select', 'options[group_column]']); // Ensure the dropdown for group column exists. $this->assertNotNull($dropdown, 'The dropdown for options[group_column] does not exist.'); $this->submitForm(['options[group_type]' => 'count'], 'Apply'); // Ensure that there is no error after submitting the form. $this->assertSession() ->pageTextNotContains('The website encountered an unexpected error. Try again later.'); } } Loading
core/modules/views/src/Plugin/views/query/Sql.php +0 −7 Original line number Diff line number Diff line Loading @@ -1774,7 +1774,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodSimple', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading @@ -1784,7 +1783,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodDistinct', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading @@ -1794,7 +1792,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodSimple', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading @@ -1804,7 +1801,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodSimple', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading @@ -1814,7 +1810,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodSimple', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading @@ -1824,7 +1819,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodSimple', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading @@ -1834,7 +1828,6 @@ public function getAggregationInfo() { 'method' => 'aggregationMethodSimple', 'handler' => [ 'argument' => 'groupby_numeric', 'field' => 'numeric', 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], Loading
core/modules/views_ui/tests/src/Functional/FieldUITest.php +30 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,17 @@ class FieldUITest extends UITestBase { * * @var array */ public static $testViews = ['test_view']; public static $testViews = [ 'test_view', 'test_aggregate_count', ]; /** * {@inheritdoc} */ protected static $modules = [ 'entity_test', ]; /** * Tests the UI of field handlers. Loading Loading @@ -104,4 +114,23 @@ public function testFieldLabel(): void { $this->assertEquals('', $view->field['title']->options['label'], 'The field label for normal styles are empty.'); } /** * Tests the UI of field aggregation settings. */ public function testFieldAggregationSettings(): void { $edit_handler_url = 'admin/structure/views/nojs/handler-group/test_aggregate_count/default/field/id'; $this->drupalGet($edit_handler_url); $this->submitForm(['options[group_type]' => 'count'], 'Apply'); $this->assertSession() ->pageTextNotContains('The website encountered an unexpected error. Try again later.'); $this->drupalGet($edit_handler_url); $dropdown = $this->getSession()->getPage()->find('named', ['select', 'options[group_column]']); // Ensure the dropdown for group column exists. $this->assertNotNull($dropdown, 'The dropdown for options[group_column] does not exist.'); $this->submitForm(['options[group_type]' => 'count'], 'Apply'); // Ensure that there is no error after submitting the form. $this->assertSession() ->pageTextNotContains('The website encountered an unexpected error. Try again later.'); } }