protected function RequestPathTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Plugin/Condition/RequestPathTest.php \Drupal\system\Tests\Plugin\Condition\RequestPathTest::setUp()
Performs setup tasks before each individual test method is run.
Overrides KernelTestBase::setUp
File
- core/
modules/ system/ src/ Tests/ Plugin/ Condition/ RequestPathTest.php, line 62 - Contains \Drupal\system\Tests\Plugin\Condition\RequestPathTest.
Class
- RequestPathTest
- Tests that the Request Path Condition, provided by the system module, is working properly.
Namespace
Drupal\system\Tests\Plugin\ConditionCode
protected function setUp() {
parent::setUp();
$this
->installSchema('system', array(
'sequences',
'url_alias',
));
$this->pluginManager = $this->container
->get('plugin.manager.condition');
// Set a mock alias manager in the container.
$this->aliasManager = new MockAliasManager();
$this->container
->set('path.alias_manager', $this->aliasManager);
// Set the test request stack in the container.
$this->requestStack = new RequestStack();
$this->container
->set('request_stack', $this->requestStack);
$this->currentPath = new CurrentPathStack($this->requestStack);
$this->container
->set('path.current', $this->currentPath);
}