diff -u b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_aggregate_count_int.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_aggregate_count_int.yml --- b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_aggregate_count_int.yml +++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_aggregate_count_int.yml @@ -191,7 +191,7 @@ precision: 0 decimal: . separator: ', ' - format_plural: 0 + format_plural: false format_plural_string: !!binary MQNAY291bnQ= prefix: '' suffix: '' diff -u b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php --- b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php +++ b/core/modules/views/tests/src/Kernel/QueryGroupByTest.php @@ -21,12 +21,13 @@ * * @var array */ - public static $testViews = ['test_group_by_in_filters', 'test_aggregate_count', 'test_aggregate_count_int', 'test_group_by_count', 'test_group_by_count_multicardinality', 'test_group_by_field_not_within_bundle']; + public static $testViews = ['test_group_by_in_filters', 'test_aggregate_count', 'test_group_by_count', 'test_group_by_count_multicardinality', 'test_group_by_field_not_within_bundle']; /** 'test_aggregate_count', 'test_aggregate_count_function', 'test_group_by_count', + 'test_aggregate_count_int', 'test_group_by_count_multicardinality', 'test_group_by_field_not_within_bundle', ]; @@ -81,25 +82,4 @@ /** - * Tests aggregate count feature on an integer field. - */ - public function testAggregateCountInt() { - $this->setupTestEntities(); - - $view = Views::getView('test_aggregate_count_int'); - $this->executeView($view); - - $this->assertCount(2, $view->result, 'Make sure the count of items is right.'); - - $types = []; - foreach ($view->result as $item) { - // num_records is an alias for id. - $types[$item->entity_test_name] = $item->id; - } - - $this->assertEquals(4, $types['name1']); - $this->assertEquals(3, $types['name2']); - } - - /** * Provides a test helper which runs a view with some aggregation function. * @@ -123,4 +103,25 @@ /** + * Tests aggregate count feature on an integer field. + */ + public function testAggregateCountInt() { + $this->setupTestEntities(); + + $view = Views::getView('test_aggregate_count_int'); + $this->executeView($view); + + $this->assertCount(2, $view->result, 'Make sure the count of items is right.'); + + $types = []; + foreach ($view->result as $item) { + // num_records is an alias for id. + $types[$item->entity_test_name] = $item->id; + } + + $this->assertEquals(4, $types['name1']); + $this->assertEquals(3, $types['name2']); + } + + /** * Provides a test helper which runs a view with some aggregation function. *