protected function ActiveWidgetOrderProcessorTest::setUp in Facets 8
Creates a new processor object for use in the tests.
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Plugin/ processor/ ActiveWidgetOrderProcessorTest.php, line 34
Class
- ActiveWidgetOrderProcessorTest
- Unit test for processor.
Namespace
Drupal\Tests\facets\Unit\Plugin\processorCode
protected function setUp() {
parent::setUp();
$facet = new Facet([], 'facets_facet');
/** @var \Drupal\facets\Result\Result[] $original_results */
$original_results = [
new Result($facet, 'Boxer', 'Boxer', 10),
new Result($facet, 'Old Major', 'Old Major', 3),
new Result($facet, 'Minimus', 'Minimus', 60),
new Result($facet, 'Mr Whymper', 'Mr. Whymper', 1),
new Result($facet, 'Clover', 'Clover', 50),
];
$original_results[1]
->setActiveState(TRUE);
$original_results[2]
->setActiveState(TRUE);
$original_results[3]
->setActiveState(TRUE);
$this->originalResults = $original_results;
$this->processor = new ActiveWidgetOrderProcessor([], 'active_widget_order', []);
}