ProcessorTest.php in Facets 8
File
modules/facets_summary/tests/src/Kernel/ProcessorTest.php
View source
<?php
namespace Drupal\Tests\facets_summary\Kernel;
use Drupal\KernelTests\KernelTestBase;
class ProcessorTest extends KernelTestBase {
public static $modules = [
'facets',
'facets_summary',
];
public function setUp() {
parent::setUp();
$this
->installEntitySchema('facets_facet');
$this
->installEntitySchema('facets_summary');
}
public function testHideWhenNotRenderedIsLast() {
$processor_manager = $this->container
->get('plugin.manager.facets_summary.processor');
$defs = $processor_manager
->getDefinitions();
$hide_when_not_rendered_weight = $defs['hide_when_not_rendered']['stages']['build'];
unset($defs['hide_when_not_rendered']);
foreach ($defs as $def) {
$this
->assertLessThan($hide_when_not_rendered_weight, $def['stages']['build']);
}
}
}