public function RestrictionManagerTest::testNoPhpNotice in Layout Builder Restrictions 8.2
Test that we can invoke getSortedPlugins without creating a notice.
File
- tests/
src/ Kernel/ RestrictionManagerTest.php, line 24
Class
- RestrictionManagerTest
- Layout builder restrictions manager kernel tests.
Namespace
Drupal\Tests\layout_builder_restrictions\KernelCode
public function testNoPhpNotice() {
/** @var \Drupal\layout_builder_restrictions\Plugin\LayoutBuilderRestrictionManager $manager */
$manager = \Drupal::service('plugin.manager.layout_builder_restriction');
$plugins = $manager
->getSortedPlugins();
// This should be at least one item long, since we ship a plugin in the
// module itself.
$this
->assertNotCount(0, $plugins);
}