You are here

public function ProcessorTest::testHideWhenNotRenderedIsLast in Facets 8

Tests that the "hide when not rendered" processors is last.

File

modules/facets_summary/tests/src/Kernel/ProcessorTest.php, line 34

Class

ProcessorTest
Class ProcessorTest.

Namespace

Drupal\Tests\facets_summary\Kernel

Code

public function testHideWhenNotRenderedIsLast() {

  /** @var \Drupal\facets_summary\Processor\ProcessorPluginManager $processor_manager */
  $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']);
  }
}