function HookOrderEqualPriorityTest::testBefore
@covers ::before
File
-
core/
tests/ Drupal/ Tests/ Core/ Hook/ HookOrderEqualPriorityTest.php, line 53
Class
- HookOrderEqualPriorityTest
- @coversDefaultClass \Drupal\Core\Hook\HookOrder
Namespace
Drupal\Tests\Core\HookCode
public function testBefore() : void {
// "a" was last, move it before "b".
HookOrder::before($this->container, 'test', 'a::a', 'b::b');
$this->assertGreaterThan($this->getPriority('b'), $this->getPriority('a'));
// Nothing else can be asserted: by setting the same priority, the setup
// had undefined order and so the services not included in the helper call
// can be in any order.
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.