You are here

protected function EntityPathAliasCollectorTest::calculateDependencies in Dependency Calculation 8

Calculates dependencies for the given entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: Entity.

Return value

array Dependencies array.

Throws

\Exception

2 calls to EntityPathAliasCollectorTest::calculateDependencies()
EntityPathAliasCollectorTest::testDependencyCollector in tests/src/Kernel/EventSubscriber/DependencyCollector/EntityPathAliasCollectorTest.php
Tests dependencies calculation for node.
PathAliasEntityCollectorTest::testDependencyCollector in tests/src/Kernel/EventSubscriber/DependencyCollector/PathAliasEntityCollectorTest.php
Tests dependencies calculation for path alias.

File

tests/src/Kernel/EventSubscriber/DependencyCollector/EntityPathAliasCollectorTest.php, line 112

Class

EntityPathAliasCollectorTest
Test node with path alias dependency collector.

Namespace

Drupal\Tests\depcalc\Kernel\EventSubscriber\DependencyCollector

Code

protected function calculateDependencies(EntityInterface $entity) : array {
  $wrapper = new DependentEntityWrapper($entity);
  return $this->calculator
    ->calculateDependencies($wrapper, new DependencyStack());
}