function HookOrderTest::getPriority

Get the priority for a service.

Overrides HookOrderTestBase::getPriority

6 calls to HookOrderTest::getPriority()
HookOrderTest::assertNoChange in core/tests/Drupal/Tests/Core/Hook/HookOrderTest.php
Asserts no change has happened.
HookOrderTest::setUp in core/tests/Drupal/Tests/Core/Hook/HookOrderTest.php
HookOrderTest::testAfter in core/tests/Drupal/Tests/Core/Hook/HookOrderTest.php
@covers ::after
HookOrderTest::testBefore in core/tests/Drupal/Tests/Core/Hook/HookOrderTest.php
@covers ::before
HookOrderTest::testFirst in core/tests/Drupal/Tests/Core/Hook/HookOrderTest.php
@covers ::first

... See full list

File

core/tests/Drupal/Tests/Core/Hook/HookOrderTest.php, line 136

Class

HookOrderTest
@coversDefaultClass \Drupal\Core\Hook\HookOrder

Namespace

Drupal\Tests\Core\Hook

Code

protected function getPriority(string $name) : int {
    $definition = $this->container
        ->getDefinition($name);
    return $definition->getTags()['kernel.event_listener'][0]['priority'];
}

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