public function DefaultsSectionStorageTest::testBuildRoutesNoFieldUi in Drupal 10
@covers ::buildRoutes
File
- core/
modules/ layout_builder/ tests/ src/ Unit/ DefaultsSectionStorageTest.php, line 418
Class
- DefaultsSectionStorageTest
- @coversDefaultClass \Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage
Namespace
Drupal\Tests\layout_builder\UnitCode
public function testBuildRoutesNoFieldUi() {
$module_handler = $this
->prophesize(ModuleHandlerInterface::class);
$module_handler
->moduleExists('field_ui')
->willReturn(FALSE);
$container = new ContainerBuilder();
$container
->set('module_handler', $module_handler
->reveal());
\Drupal::setContainer($container);
$collection = new RouteCollection();
$this->plugin
->buildRoutes($collection);
$this
->assertEmpty($collection
->all());
}