Loading core/modules/views/src/Plugin/views/filter/InOperator.php +2 −2 Original line number Diff line number Diff line Loading @@ -320,8 +320,8 @@ public function acceptExposedInput($input) { // The "All" state for this type of filter could have a default value. If // this is a non-multiple and non-required option, then this filter will // participate by using the default settings if 'reduce' is true. if (empty($this->options['expose']['multiple']) && empty($this->options['expose']['required']) && !empty($this->options['expose']['reduce'])) { // participate by using the default settings *if* 'limit' is true. if (empty($this->options['expose']['multiple']) && empty($this->options['expose']['required']) && !empty($this->options['expose']['limit'])) { $identifier = $this->options['expose']['identifier']; if ($input[$identifier] == 'All') { return TRUE; Loading core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php +0 −41 Original line number Diff line number Diff line Loading @@ -253,47 +253,6 @@ protected function getGroupedExposedFilters(): array { return $filters; } /** * Tests exposed filter with reduce as TRUE. */ public function testFilterExposedReduce(): void { $view = Views::getView('test_view'); $view->setDisplay(); $view->displayHandlers->get('default')->overrideOption('filters', [ 'age' => [ 'id' => 'age', 'field' => 'age', 'table' => 'views_test_data', 'value' => [25 => 25, 27 => 27], 'operator' => 'in', 'exposed' => TRUE, 'expose' => [ 'operator' => 'age_op', 'label' => 'age', 'identifier' => 'age', 'reduce' => TRUE, ], ], ]); $this->executeView($view); $expected_result = [ [ 'name' => 'John', 'age' => 25, ], [ 'name' => 'George', 'age' => 27, ], ]; $this->assertCount(2, $view->result); $this->assertIdenticalResultset($view, $expected_result, $this->columnMap); } /** * Tests that the InOperator filter can handle TranslatableMarkup. */ Loading Loading
core/modules/views/src/Plugin/views/filter/InOperator.php +2 −2 Original line number Diff line number Diff line Loading @@ -320,8 +320,8 @@ public function acceptExposedInput($input) { // The "All" state for this type of filter could have a default value. If // this is a non-multiple and non-required option, then this filter will // participate by using the default settings if 'reduce' is true. if (empty($this->options['expose']['multiple']) && empty($this->options['expose']['required']) && !empty($this->options['expose']['reduce'])) { // participate by using the default settings *if* 'limit' is true. if (empty($this->options['expose']['multiple']) && empty($this->options['expose']['required']) && !empty($this->options['expose']['limit'])) { $identifier = $this->options['expose']['identifier']; if ($input[$identifier] == 'All') { return TRUE; Loading
core/modules/views/tests/src/Kernel/Handler/FilterInOperatorTest.php +0 −41 Original line number Diff line number Diff line Loading @@ -253,47 +253,6 @@ protected function getGroupedExposedFilters(): array { return $filters; } /** * Tests exposed filter with reduce as TRUE. */ public function testFilterExposedReduce(): void { $view = Views::getView('test_view'); $view->setDisplay(); $view->displayHandlers->get('default')->overrideOption('filters', [ 'age' => [ 'id' => 'age', 'field' => 'age', 'table' => 'views_test_data', 'value' => [25 => 25, 27 => 27], 'operator' => 'in', 'exposed' => TRUE, 'expose' => [ 'operator' => 'age_op', 'label' => 'age', 'identifier' => 'age', 'reduce' => TRUE, ], ], ]); $this->executeView($view); $expected_result = [ [ 'name' => 'John', 'age' => 25, ], [ 'name' => 'George', 'age' => 27, ], ]; $this->assertCount(2, $view->result); $this->assertIdenticalResultset($view, $expected_result, $this->columnMap); } /** * Tests that the InOperator filter can handle TranslatableMarkup. */ Loading