function PathProcessorFrontTest::testProcessInboundBadConfig

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php \Drupal\Tests\Core\PathProcessor\PathProcessorFrontTest::testProcessInboundBadConfig()
  2. 8.9.x core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php \Drupal\Tests\Core\PathProcessor\PathProcessorFrontTest::testProcessInboundBadConfig()
  3. 11.x core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php \Drupal\Tests\Core\PathProcessor\PathProcessorFrontTest::testProcessInboundBadConfig()

Tests inbound failure with broken config.

@covers ::processInbound

File

core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorFrontTest.php, line 61

Class

PathProcessorFrontTest
Test front page path processing.

Namespace

Drupal\Tests\Core\PathProcessor

Code

public function testProcessInboundBadConfig() : void {
    $config_factory = $this->prophesize(ConfigFactoryInterface::class);
    $config = $this->prophesize(ImmutableConfig::class);
    $config_factory->get('system.site')
        ->willReturn($config->reveal());
    $config->get('page.front')
        ->willReturn('');
    $processor = new PathProcessorFront($config_factory->reveal());
    $this->expectException(NotFoundHttpException::class);
    $processor->processInbound('/', new Request());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.