function ConfigNamesMapperTest::setUpMockRouteProvider

Reinitializes the route provider as a mock object.

5 calls to ConfigNamesMapperTest::setUpMockRouteProvider()
ConfigNamesMapperTest::testGetAddRoute in core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
Tests ConfigNamesMapper::getAddRoute().
ConfigNamesMapperTest::testGetBaseRoute in core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
Tests ConfigNamesMapper::getBaseRoute().
ConfigNamesMapperTest::testGetDeleteRoute in core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
Tests ConfigNamesMapper::getRoute().
ConfigNamesMapperTest::testGetEditRoute in core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
Tests ConfigNamesMapper::getEditRoute().
ConfigNamesMapperTest::testGetOverviewRoute in core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
Tests ConfigNamesMapper::getOverviewRoute().

File

core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php, line 130

Class

ConfigNamesMapperTest
Tests the functionality provided by the configuration names mapper.

Namespace

Drupal\Tests\config_translation\Unit

Code

protected function setUpMockRouteProvider() : void {
  $this->routeProvider = $this->createMock(RouteProviderInterface::class);
  $this->routeProvider
    ->expects($this->atLeastOnce())
    ->method('getRouteByName')
    ->with('system.site_information_settings')
    ->willReturn($this->baseRoute);
  $reflection = new \ReflectionProperty($this->configNamesMapper, 'routeProvider');
  $reflection->setValue($this->configNamesMapper, $this->routeProvider);
}

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