protected function DeprecatedClassesTest::setUp in Drupal 8
Overrides UnitTestCase::setUp
File
- core/
modules/ path_alias/ tests/ src/ Unit/ DeprecatedClassesTest.php, line 79
Class
- DeprecatedClassesTest
- Tests deprecation of path alias core service classes.
Namespace
Drupal\Tests\path_alias\UnitCode
protected function setUp() {
parent::setUp();
$this->aliasManager = $this
->prophesize(AliasManagerInterface::class)
->reveal();
$this->aliasRepository = $this
->prophesize(AliasRepositoryInterface::class)
->reveal();
$this->aliasWhitelist = $this
->prophesize(AliasWhitelistInterface::class)
->reveal();
$this->cache = $this
->prophesize(CacheBackendInterface::class)
->reveal();
$this->currentPathStack = $this
->prophesize(CurrentPathStack::class)
->reveal();
$this->languageManager = $this
->prophesize(LanguageManagerInterface::class)
->reveal();
$this->lock = $this
->prophesize(LockBackendInterface::class)
->reveal();
$this->state = $this
->prophesize(StateInterface::class)
->reveal();
/** @var \Prophecy\Prophecy\ObjectProphecy $container */
$container = $this
->prophesize(ContainerBuilder::class);
$container
->get('path_alias.manager')
->willReturn($this->aliasManager);
\Drupal::setContainer($container
->reveal());
}